group(function () { Route::resource('order', 'OrderResourceController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'OrderResourceController'); }); // Public routes for pages Route::get('purchases/', 'OrderPublicController@index'); Route::get('purchases/{slug?}', 'OrderPublicController@show'); } ); } // web routes for item Route::prefix('{guard}/purchase')->group(function () { Route::resource('item', 'ItemResourceController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'ItemResourceController'); }); // Public routes for pages Route::get('purchases/', 'ItemPublicController@index'); Route::get('purchases/{slug?}', 'ItemPublicController@show'); } ); }