name('index'); // ------------------------------ تورها ------------------------------ Route::prefix('tours') ->name('tours.') ->controller(TourController::class) ->group(function () { Route::get('/', 'index')->name('index'); Route::get('remove-filters', 'removeFilters')->name('remove-filters'); Route::get('search/suggestion', 'searchSuggestion')->name('searchSuggestion'); Route::get('{tour}', 'show')->name('show'); }); // ------------------------------ پروازها ------------------------------ Route::prefix('flights') ->name('flights.') ->controller(FlightController::class) ->group(function () { Route::get('/', 'index')->name('index'); Route::get('search', 'search')->name('search'); Route::get('{flight}', 'show')->name('show'); }); // ------------------------------ نظرات (پلی‌مورفیک) ------------------------------ Route::prefix('comments') ->name('comments.') ->middleware('auth') ->controller(AccountCommentController::class) // اصلاح شد: استفاده از کنترلر صحیح ->group(function () { Route::post('tour/{tour}', 'storeTour')->name('tour.store'); Route::post('flight/{flight}', 'storeFlight')->name('flight.store'); }); // ------------------------------ علاقه‌مندی‌ها (عمومی) ------------------------------ Route::prefix('favorites')->name('favorites.')->middleware('auth')->controller(FavoriteController::class)->group(function () { Route::post('toggle', 'toggle')->name('toggle'); }); // ------------------------------ رزرو ------------------------------ Route::prefix('booking') ->name('booking.') ->middleware('auth') ->controller(SiteBookingController::class) ->group(function () { Route::get('/', 'index')->name('index'); Route::post('tours/{tour}', 'store')->name('store'); Route::get('flights/{flight}', 'flight')->name('flight'); Route::post('flights/{flight}', 'storeFlight')->name('flight.store'); }); // ------------------------------ پنل کاربری ------------------------------ Route::prefix('account') ->name('account.') ->middleware('auth') ->group(function () { Route::get('/', [IndexController::class, 'index'])->name('index'); // علاقه‌مندی‌ها Route::get('favorites', [AccountFavoriteController::class, 'index'])->name('favorites'); // نظرات Route::get('comments', [AccountCommentController::class, 'myComments'])->name('comments'); // پروفایل Route::prefix('edit-profile') ->name('edit-profile.') ->controller(EditProfileController::class) ->group(function () { Route::get('/', 'index')->name('index'); Route::post('/', 'post')->name('post'); }); });