group(function () { Route::get('plan/form/{element}', 'PlanAPIController@form'); Route::resource('plan', 'PlanAPIController'); }); // Public routes for plan Route::get('plans/', 'PlanPublicController@index'); Route::get('plans/{slug?}', 'PlanPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for plans Route::prefix('{guard}/plan')->group(function () { Route::get('plan/form/{element}', 'PlanAPIController@form'); Route::apiResource('plan', 'PlanAPIController'); }); // Public routes for plans Route::get('plan/Plan', 'PlanPublicController@getPlan'); } ); } // API routes for location Route::prefix('{guard}/plan')->group(function () { Route::get('location/form/{element}', 'LocationAPIController@form'); Route::resource('location', 'LocationAPIController'); }); // Public routes for location Route::get('plans/', 'LocationPublicController@index'); Route::get('plans/{slug?}', 'LocationPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for plans Route::prefix('{guard}/plan')->group(function () { Route::get('location/form/{element}', 'LocationAPIController@form'); Route::apiResource('location', 'LocationAPIController'); }); // Public routes for plans Route::get('plan/Location', 'LocationPublicController@getLocation'); } ); } // API routes for crew Route::prefix('{guard}/plan')->group(function () { Route::get('crew/form/{element}', 'CrewAPIController@form'); Route::resource('crew', 'CrewAPIController'); }); // Public routes for crew Route::get('plans/', 'CrewPublicController@index'); Route::get('plans/{slug?}', 'CrewPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for plans Route::prefix('{guard}/plan')->group(function () { Route::get('crew/form/{element}', 'CrewAPIController@form'); Route::apiResource('crew', 'CrewAPIController'); }); // Public routes for plans Route::get('plan/Crew', 'CrewPublicController@getCrew'); } ); } // API routes for passenger Route::prefix('{guard}/plan')->group(function () { Route::get('passenger/form/{element}', 'PassengerAPIController@form'); Route::resource('passenger', 'PassengerAPIController'); }); // Public routes for passenger Route::get('plans/', 'PassengerPublicController@index'); Route::get('plans/{slug?}', 'PassengerPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for plans Route::prefix('{guard}/plan')->group(function () { Route::get('passenger/form/{element}', 'PassengerAPIController@form'); Route::apiResource('passenger', 'PassengerAPIController'); }); // Public routes for plans Route::get('plan/Passenger', 'PassengerPublicController@getPassenger'); } ); } // API routes for floatpassenger Route::prefix('{guard}/plan')->group(function () { Route::get('floatpassenger/form/{element}', 'FloatpassengerAPIController@form'); Route::resource('floatpassenger', 'FloatpassengerAPIController'); }); // Public routes for floatpassenger Route::get('plans/', 'FloatpassengerPublicController@index'); Route::get('plans/{slug?}', 'FloatpassengerPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for plans Route::prefix('{guard}/plan')->group(function () { Route::get('floatpassenger/form/{element}', 'FloatpassengerAPIController@form'); Route::apiResource('floatpassenger', 'FloatpassengerAPIController'); }); // Public routes for plans Route::get('plan/Floatpassenger', 'FloatpassengerPublicController@getFloatpassenger'); } ); } // API routes for users Route::prefix('{guard}/plan')->group(function () { Route::get('users/form/{element}', 'UsersAPIController@form'); Route::resource('users', 'UsersAPIController'); }); // Public routes for users Route::get('plans/', 'UsersPublicController@index'); Route::get('plans/{slug?}', 'UsersPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for plans Route::prefix('{guard}/plan')->group(function () { Route::get('users/form/{element}', 'UsersAPIController@form'); Route::apiResource('users', 'UsersAPIController'); }); // Public routes for plans Route::get('plan/Users', 'UsersPublicController@getUsers'); } ); } // API routes for manager Route::prefix('{guard}/plan')->group(function () { Route::get('manager/form/{element}', 'ManagerAPIController@form'); Route::resource('manager', 'ManagerAPIController'); }); // Public routes for manager Route::get('plans/', 'ManagerPublicController@index'); Route::get('plans/{slug?}', 'ManagerPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for plans Route::prefix('{guard}/plan')->group(function () { Route::get('manager/form/{element}', 'ManagerAPIController@form'); Route::apiResource('manager', 'ManagerAPIController'); }); // Public routes for plans Route::get('plan/Manager', 'ManagerPublicController@getManager'); } ); }