group(function () { Route::resource('assets', 'AssetsResourceController'); }); // Public routes for assets Route::get('assets/', 'AssetsPublicController@index'); Route::get('assets/{slug?}', 'AssetsPublicController@show'); 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', 'AssetsResourceController'); }); // Public routes for pages Route::get('assets/', 'AssetsPublicController@index'); Route::get('assets/{slug?}', 'AssetsPublicController@show'); } ); } // web routes for engine Route::prefix('{guard}/asset')->group(function () { Route::resource('engine', 'EngineResourceController'); }); // Public routes for engine Route::get('assets/', 'EnginePublicController@index'); Route::get('assets/{slug?}', 'EnginePublicController@show'); 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', 'EngineResourceController'); }); // Public routes for pages Route::get('assets/', 'EnginePublicController@index'); Route::get('assets/{slug?}', 'EnginePublicController@show'); } ); } // web routes for type Route::prefix('{guard}/asset')->group(function () { Route::resource('type', 'TypeResourceController'); }); // Public routes for type Route::get('assets/', 'TypePublicController@index'); Route::get('assets/{slug?}', 'TypePublicController@show'); 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', 'TypeResourceController'); }); // Public routes for pages Route::get('assets/', 'TypePublicController@index'); Route::get('assets/{slug?}', 'TypePublicController@show'); } ); }