group(function () { Route::get('infocategory/form/{element}', 'InfocategoryAPIController@form'); Route::resource('infocategory', 'InfocategoryAPIController'); }); // Public routes for infocategory Route::get('infobjects/', 'InfocategoryPublicController@index'); Route::get('infobjects/{slug?}', 'InfocategoryPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for infobjects Route::prefix('{guard}/infobject')->group(function () { Route::get('infocategory/form/{element}', 'InfocategoryAPIController@form'); Route::apiResource('infocategory', 'InfocategoryAPIController'); }); // Public routes for infobjects Route::get('infobject/Infocategory', 'InfocategoryPublicController@getInfocategory'); } ); } // API routes for infobject Route::prefix('{guard}/infobject')->group(function () { Route::get('infobject/form/{element}', 'InfobjectAPIController@form'); Route::resource('infobject', 'InfobjectAPIController'); }); // Public routes for infobject Route::get('infobjects/', 'InfobjectPublicController@index'); Route::get('infobjects/{slug?}', 'InfobjectPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for infobjects Route::prefix('{guard}/infobject')->group(function () { Route::get('infobject/form/{element}', 'InfobjectAPIController@form'); Route::apiResource('infobject', 'InfobjectAPIController'); }); // Public routes for infobjects Route::get('infobject/Infobject', 'InfobjectPublicController@getInfobject'); } ); } // API routes for icon Route::prefix('{guard}/infobject')->group(function () { Route::get('icon/form/{element}', 'IconAPIController@form'); Route::resource('icon', 'IconAPIController'); }); // Public routes for icon Route::get('infobjects/', 'IconPublicController@index'); Route::get('infobjects/{slug?}', 'IconPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for infobjects Route::prefix('{guard}/infobject')->group(function () { Route::get('icon/form/{element}', 'IconAPIController@form'); Route::apiResource('icon', 'IconAPIController'); }); // Public routes for infobjects Route::get('infobject/Icon', 'IconPublicController@getIcon'); } ); }