group(function () { Route::resource('infocategory', 'InfocategoryResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'InfocategoryResourceController'); }); // Public routes for pages Route::get('infobjects/', 'InfocategoryPublicController@index'); Route::get('infobjects/{slug?}', 'InfocategoryPublicController@show'); } ); } // web routes for infobject Route::prefix('{guard}/infobject')->group(function () { Route::resource('infobject', 'InfobjectResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'InfobjectResourceController'); }); // Public routes for pages Route::get('infobjects/', 'InfobjectPublicController@index'); Route::get('infobjects/{slug?}', 'InfobjectPublicController@show'); } ); } // web routes for icon Route::prefix('{guard}/infobject')->group(function () { Route::resource('icon', 'IconResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'IconResourceController'); }); // Public routes for pages Route::get('infobjects/', 'IconPublicController@index'); Route::get('infobjects/{slug?}', 'IconPublicController@show'); } ); }