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::prefix('edit-profile')->name('edit-profile.')->controller(EditProfileController::class)->group(function () { Route::get('/', 'index')->name('index'); Route::put('/', 'post')->name('post'); }); Route::get('booking', [BookingController::class, 'index'])->name('booking'); 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'); });