group(function () { Route::resource('team', 'TeamResourceController'); }); 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', 'TeamResourceController'); }); // Public routes for pages Route::get('teams/', 'TeamPublicController@index'); Route::get('teams/{slug?}', 'TeamPublicController@show'); } ); } // web routes for user Route::prefix('{guard}/team')->group(function () { Route::resource('user', 'UserResourceController'); }); 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', 'UserResourceController'); }); // Public routes for pages Route::get('teams/', 'UserPublicController@index'); Route::get('teams/{slug?}', 'UserPublicController@show'); } ); }