name('index'); Route::prefix('flights')->controller(FlightController::class)->name('flights.')->group(function () { Route::get('/', 'index')->name('index'); Route::prefix('{flight}')->group(function () { Route::get('/', 'show')->name('show'); Route::post('/comment', 'commentStore')->name('comments.store'); Route::post('/booking', [BookingController::class, 'store'])->name('booking.store'); }); }); Route::prefix('tours')->controller(TourController::class)->name('tours.')->group(function () { Route::get('/', 'index')->name('index'); Route::prefix('{tour}')->group(function () { Route::get('/', 'show')->name('show'); Route::post('/comment', 'commentStore')->name('comments.store'); Route::post('/booking', [BookingController::class, 'store'])->name('booking.store'); }); }); Route::prefix('account')->name('accounts.')->middleware('auth')->group(function () { Route::controller(ProfileController::class)->group(function () { Route::get('/profile', 'index')->name('profile'); Route::get('/comments', 'comments')->name('comments'); Route::get('/get-cities/{province_id}', 'getCities')->name('get-cities'); }); Route::prefix('edit-profile')->name('edit-profile.')->controller(EditProfileController::class)->group(function () { Route::get('/', 'index')->name('index'); Route::post('/', 'update')->name('update'); Route::post('change-password', 'changePassword')->name('change-password'); }); Route::prefix('favorites')->name('favorites.')->controller(FavoriteController::class)->group(function () { Route::get('/', 'index')->name('index'); Route::prefix('tour/{tour}')->name('tour.')->group(function () { Route::post('/', 'toggleTour')->name('toggle'); Route::delete('/', 'removeTour')->name('remove'); }); Route::prefix('flight/{flight}')->name('flight.')->group(function () { Route::post('/', 'toggleFlight')->name('toggle'); Route::delete('/', 'removeFlight')->name('remove'); }); }); });