group(function () { Route::resource('plan', 'PlanResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'PlanResourceController'); }); // Public routes for pages Route::get('plans/', 'PlanPublicController@index'); Route::get('plans/{slug?}', 'PlanPublicController@show'); } ); } // web routes for location Route::prefix('{guard}/plan')->group(function () { Route::resource('location', 'LocationResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'LocationResourceController'); }); // Public routes for pages Route::get('plans/', 'LocationPublicController@index'); Route::get('plans/{slug?}', 'LocationPublicController@show'); } ); } // web routes for crew Route::prefix('{guard}/plan')->group(function () { Route::resource('crew', 'CrewResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'CrewResourceController'); }); // Public routes for pages Route::get('plans/', 'CrewPublicController@index'); Route::get('plans/{slug?}', 'CrewPublicController@show'); } ); } // web routes for passenger Route::prefix('{guard}/plan')->group(function () { Route::resource('passenger', 'PassengerResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'PassengerResourceController'); }); // Public routes for pages Route::get('plans/', 'PassengerPublicController@index'); Route::get('plans/{slug?}', 'PassengerPublicController@show'); } ); } // web routes for floatpassenger Route::prefix('{guard}/plan')->group(function () { Route::resource('floatpassenger', 'FloatpassengerResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'FloatpassengerResourceController'); }); // Public routes for pages Route::get('plans/', 'FloatpassengerPublicController@index'); Route::get('plans/{slug?}', 'FloatpassengerPublicController@show'); } ); } // web routes for users Route::prefix('{guard}/plan')->group(function () { Route::resource('users', 'UsersResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'UsersResourceController'); }); // Public routes for pages Route::get('plans/', 'UsersPublicController@index'); Route::get('plans/{slug?}', 'UsersPublicController@show'); } ); } // web routes for manager Route::prefix('{guard}/plan')->group(function () { Route::resource('manager', 'ManagerResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'ManagerResourceController'); }); // Public routes for pages Route::get('plans/', 'ManagerPublicController@index'); Route::get('plans/{slug?}', 'ManagerPublicController@show'); } ); }