group(function () { Route::get('team/form/{element}', 'TeamAPIController@form'); Route::resource('team', 'TeamAPIController'); }); // Public routes for team Route::get('teams/', 'TeamPublicController@index'); Route::get('teams/{slug?}', 'TeamPublicController@show'); 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'); }); // Public routes for user Route::get('teams/', 'UserPublicController@index'); Route::get('teams/{slug?}', 'UserPublicController@show'); 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'); } ); }