name('index'); Route::prefix('flights')->name('flights.')->controller(FlightController::class)->group(function () { Route::get('/', 'index')->name('index'); Route::get('{flight}', 'show')->name('show'); }); Route::prefix('tours')->name('tours.')->controller(TourController::class)->group(function () { Route::get('/', 'index')->name('index'); Route::get('{tour}', 'show')->name('show'); }); Route::controller(CommentController::class)->group(function () { Route::post('flights/{flight}/comments', 'storeFlight')->name('flights.comments'); Route::post('tours/{tour}/comments', 'storeTour')->name('tours.comments'); }); Route::prefix('account')->name('account.')->middleware('auth')->group(function () { Route::get('profile', [ProfileController::class, 'index'])->name('profile'); Route::post('profile/image', [ProfileController::class, 'updateImage']) ->name('profile.image.update'); Route::get('cities-by-province/{province}', function (\App\Models\Province $province) { return $province->cities()->orderBy('name')->get(['id', 'name']); })->name('cities-by-province'); Route::prefix('edit-profile')->name('edit-profile.')->controller(EditProfileController::class)->group(function () { Route::get('/', 'index')->name('index'); Route::put('/', 'post')->name('post'); }); Route::get('wishlist', [WishlistController::class, 'index'])->name('wishlist'); Route::get('wishlist/{type}/{id}', [WishlistController::class, 'toggle'])->name('wishlist.toggle'); Route::get('comments', [CommentHistoryController::class, 'index'])->name('comments'); Route::get('bookings', [BookingController::class, 'index']) ->name('booking'); Route::post('bookings/flight/{flight}', [BookingController::class, 'storeFlight']) ->name('booking.flight'); Route::post('bookings/tour/{tour}', [BookingController::class, 'storeTour']) ->name('booking.tour'); });