group(function () { Route::get('assets/form/{element}', 'AssetsAPIController@form'); Route::resource('assets', 'AssetsAPIController'); }); // 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 assets Route::prefix('{guard}/asset')->group(function () { Route::get('assets/form/{element}', 'AssetsAPIController@form'); Route::apiResource('assets', 'AssetsAPIController'); }); // Public routes for assets Route::get('asset/Assets', 'AssetsPublicController@getAssets'); } ); } // API routes for engine Route::prefix('{guard}/asset')->group(function () { Route::get('engine/form/{element}', 'EngineAPIController@form'); Route::resource('engine', 'EngineAPIController'); }); // 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 assets Route::prefix('{guard}/asset')->group(function () { Route::get('engine/form/{element}', 'EngineAPIController@form'); Route::apiResource('engine', 'EngineAPIController'); }); // Public routes for assets Route::get('asset/Engine', 'EnginePublicController@getEngine'); } ); } // API routes for type Route::prefix('{guard}/asset')->group(function () { Route::get('type/form/{element}', 'TypeAPIController@form'); Route::resource('type', 'TypeAPIController'); }); // 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 assets Route::prefix('{guard}/asset')->group(function () { Route::get('type/form/{element}', 'TypeAPIController@form'); Route::apiResource('type', 'TypeAPIController'); }); // Public routes for assets Route::get('asset/Type', 'TypePublicController@getType'); } ); }