group(function () { Route::get('team/form/{element}', 'TeamAPIController@form'); Route::resource('team', 'TeamAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for teams Route::prefix('{guard}/team')->group(function () { Route::get('team/form/{element}', 'TeamAPIController@form'); Route::apiResource('team', 'TeamAPIController'); }); // Public routes for teams Route::get('team/Team', 'TeamPublicController@getTeam'); } ); } // API routes for user Route::prefix('{guard}/team')->group(function () { Route::get('user/form/{element}', 'UserAPIController@form'); Route::resource('user', 'UserAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for teams Route::prefix('{guard}/team')->group(function () { Route::get('user/form/{element}', 'UserAPIController@form'); Route::apiResource('user', 'UserAPIController'); }); // Public routes for teams Route::get('team/User', 'UserPublicController@getUser'); } ); }