378 lines
17 KiB
PHP
378 lines
17 KiB
PHP
<?php
|
|
|
|
|
|
use App\Http\Controllers\Account\BookingController;
|
|
use App\Http\Controllers\Account\EditProfileController;
|
|
use App\Http\Controllers\Account\FavoriteController;
|
|
use App\Http\Controllers\BookingController as SiteBookingController;
|
|
use App\Http\Controllers\FlightController;
|
|
use App\Http\Controllers\IndexController;
|
|
use App\Http\Controllers\PageController;
|
|
use App\Http\Controllers\TourController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
// ------------------------------ index ------------------------------
|
|
Route::get('/', [IndexController::class, 'index'])->name('index');
|
|
|
|
// ------------------------------ tours (مثل products) ------------------------------
|
|
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'); // قبل از {tour}
|
|
Route::get('{tour}', 'show')->name('show');
|
|
});
|
|
|
|
// ------------------------------ flights ------------------------------
|
|
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('favorites')->name('favorites.')
|
|
->middleware('auth')->controller(FavoriteController::class)
|
|
->group(function () {
|
|
Route::get('/', 'index')->name('index');
|
|
Route::post('toggle', 'toggle')->name('toggle'); // افزودن/حذف با ajax
|
|
Route::get('clear', 'clear')->name('clear');
|
|
});
|
|
|
|
// ------------------------------ رزرو (مرحله اول: بدون پرداخت) ------------------------------
|
|
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 () {
|
|
|
|
// 🔥 تغییر اینجا: بهجای HomeController از IndexController
|
|
Route::get('/', [IndexController::class, 'index'])->name('index'); // داشبورد
|
|
|
|
Route::controller(BookingController::class)->group(function () {
|
|
Route::get('bookings', 'index')->name('bookings'); // رزروها
|
|
});
|
|
|
|
Route::controller(FavoriteController::class)->group(function () {
|
|
Route::get('favorites', 'index')->name('favorites');
|
|
});
|
|
|
|
Route::prefix('edit-profile')->name('edit-profile.')
|
|
->controller(EditProfileController::class)->group(function () {
|
|
Route::get('/', 'index')->name('index');
|
|
Route::post('/', 'post')->name('post');
|
|
});
|
|
});
|
|
|
|
// ------------------------------ صفحات ثابت ------------------------------
|
|
Route::get('/about', [PageController::class, 'about'])->name('about');
|
|
Route::get('/contact', [PageController::class, 'contact'])->name('contact');
|
|
Route::get('/faq', [PageController::class, 'faq'])->name('faq');
|
|
|
|
//
|
|
//use App\Http\Controllers\Account\BookingController;
|
|
//use App\Http\Controllers\Account\EditProfileController;
|
|
//use App\Http\Controllers\Account\FavoriteController;
|
|
//use App\Http\Controllers\Account\HomeController;
|
|
//use App\Http\Controllers\BookingController as SiteBookingController;
|
|
////use App\Http\Controllers\CommentController;
|
|
//use App\Http\Controllers\FlightController;
|
|
//use App\Http\Controllers\IndexController;
|
|
//use App\Http\Controllers\PageController;
|
|
//use App\Http\Controllers\TourController;
|
|
//
|
|
//use Illuminate\Support\Facades\Route;
|
|
////use App\Http\Controllers\BookingController;
|
|
////use App\Http\Controllers\CommentController;
|
|
////use App\Http\Controllers\EditProfileController;
|
|
////use App\Http\Controllers\FavoriteController;
|
|
////use App\Http\Controllers\HomeController;
|
|
////use App\Http\Controllers\BookingController as SiteBookingController;
|
|
////use App\Http\Controllers\FlightController;
|
|
////use App\Http\Controllers\IndexController;
|
|
////use App\Http\Controllers\PageController;
|
|
////use App\Http\Controllers\TourController;
|
|
////use Illuminate\Support\Facades\Route;
|
|
//
|
|
//// ------------------------------ index ------------------------------
|
|
//Route::get('/', [IndexController::class, 'index'])->name('index');
|
|
//
|
|
//// ------------------------------ tours (مثل products) ------------------------------
|
|
//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'); // قبل از {tour}
|
|
// Route::get('{tour}', 'show')->name('show');
|
|
// });
|
|
//
|
|
//// ------------------------------ flights ------------------------------
|
|
//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::post('tours/{tour}/comments', [CommentController::class, 'store'])
|
|
//// ->middleware('auth')->name('comments.store');
|
|
//
|
|
//// ------------------------------ علاقهمندیها ------------------------------
|
|
//Route::prefix('favorites')->name('favorites.')
|
|
// ->middleware('auth')->controller(FavoriteController::class)
|
|
// ->group(function () {
|
|
// Route::get('/', 'index')->name('index');
|
|
// Route::post('toggle', 'toggle')->name('toggle'); // افزودن/حذف با ajax
|
|
// Route::get('clear', 'clear')->name('clear');
|
|
// });
|
|
//
|
|
//// ------------------------------ رزرو (مرحله اول: بدون پرداخت) ------------------------------
|
|
//
|
|
//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('/', [HomeController::class, 'index'])->name('index'); // داشبورد
|
|
//
|
|
// Route::controller(BookingController::class)->group(function () {
|
|
// Route::get('bookings', 'index')->name('bookings'); // رزروها
|
|
// });
|
|
//
|
|
// Route::controller(FavoriteController::class)->group(function () {
|
|
// Route::get('favorites', 'index')->name('favorites');
|
|
// });
|
|
//
|
|
//// Route::controller(CommentController::class)->group(function () {
|
|
//// Route::get('comments', 'index')->name('comments');
|
|
//// });
|
|
//
|
|
// Route::prefix('edit-profile')->name('edit-profile.')
|
|
// ->controller(EditProfileController::class)->group(function () {
|
|
// Route::get('/', 'index')->name('index');
|
|
// Route::post('/', 'post')->name('post');
|
|
// });
|
|
// });
|
|
//
|
|
//// ------------------------------ صفحات ثابت ------------------------------
|
|
//Route::get('/about', [PageController::class, 'about'])->name('about');
|
|
//Route::get('/contact', [PageController::class, 'contact'])->name('contact');
|
|
//Route::get('/faq', [PageController::class, 'faq'])->name('faq');
|
|
|
|
//
|
|
//
|
|
//use App\Http\Controllers\Account\BookingController as AccountBookingController;
|
|
//use App\Http\Controllers\Account\EditProfileController;
|
|
//use App\Http\Controllers\Account\FavoriteController as AccountFavoriteController;
|
|
//use App\Http\Controllers\Account\HomeController;
|
|
//use App\Http\Controllers\Account\CommentController as AccountCommentController;
|
|
//use App\Http\Controllers\BookingController as SiteBookingController;
|
|
//use App\Http\Controllers\CommentController;
|
|
//use App\Http\Controllers\FavoriteController as SiteFavoriteController;
|
|
//use App\Http\Controllers\FlightController;
|
|
//use App\Http\Controllers\IndexController;
|
|
//use App\Http\Controllers\PageController;
|
|
//use App\Http\Controllers\TourController;
|
|
//use Illuminate\Support\Facades\Route;
|
|
//
|
|
//// ------------------------------ index ------------------------------
|
|
//Route::get('/', [IndexController::class, 'index'])->name('index');
|
|
//
|
|
//// ------------------------------ json-suggestion-search (جستجوی پیشنهادی تورها) ------------------------------
|
|
//// قبل از گروه tours تعریف شد تا با روت {tour} تداخل پیدا نکند
|
|
//Route::get('tours/search/suggestion', [TourController::class, 'searchSuggestion'])
|
|
// ->name('tours.searchSuggestion');
|
|
//
|
|
//// ------------------------------ tours ------------------------------
|
|
//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('{tour}', 'show')->name('show');
|
|
// });
|
|
//
|
|
//// ------------------------------ flights ------------------------------
|
|
//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::post('tours/{tour}/comments', [CommentController::class, 'store'])
|
|
// ->middleware('auth')
|
|
// ->name('comments.store');
|
|
//
|
|
//// ------------------------------ علاقهمندیها ------------------------------
|
|
//Route::prefix('favorites')
|
|
// ->name('favorites.')
|
|
// ->middleware('auth')
|
|
// ->controller(SiteFavoriteController::class)
|
|
// ->group(function () {
|
|
// Route::get('/', 'index')->name('index');
|
|
// Route::post('toggle', 'toggle')->name('toggle'); // افزودن/حذف با ajax
|
|
// Route::get('clear', 'clear')->name('clear');
|
|
// });
|
|
//
|
|
//// ------------------------------ رزرو (بدون پرداخت) ------------------------------
|
|
//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::prefix('account')
|
|
// ->name('account.')
|
|
// ->middleware('auth')
|
|
// ->group(function () {
|
|
//
|
|
// Route::get('/', [HomeController::class, 'index'])->name('index'); // داشبورد
|
|
//
|
|
// Route::get('bookings', [AccountBookingController::class, 'index'])->name('bookings');
|
|
// Route::get('favorites', [AccountFavoriteController::class, 'index'])->name('favorites');
|
|
// Route::get('comments', [AccountCommentController::class, 'index'])->name('comments');
|
|
//
|
|
// Route::prefix('edit-profile')
|
|
// ->name('edit-profile.')
|
|
// ->controller(EditProfileController::class)
|
|
// ->group(function () {
|
|
// Route::get('/', 'index')->name('index');
|
|
// Route::post('/', 'post')->name('post');
|
|
// });
|
|
// });
|
|
//
|
|
//// ------------------------------ صفحات ثابت ------------------------------
|
|
//Route::get('/about', [PageController::class, 'about'])->name('about');
|
|
//Route::get('/contact', [PageController::class, 'contact'])->name('contact');
|
|
//Route::get('/faq', [PageController::class, 'faq'])->name('faq');
|
|
|
|
//
|
|
//
|
|
////use App\Http\Controllers\Account\EditProfileController;
|
|
////use App\Http\Controllers\Account\BookingController;
|
|
////use App\Http\Controllers\Account\FavoriteController;
|
|
////use App\Http\Controllers\BookingController as SiteBookingController;
|
|
////use App\Http\Controllers\CommentController;
|
|
////use App\Http\Controllers\FavoriteController as SiteFavoriteController;
|
|
////use App\Http\Controllers\FlightController;
|
|
//use App\Http\Controllers\IndexController;
|
|
////use App\Http\Controllers\PageController;
|
|
////use App\Http\Controllers\PaymentController;
|
|
//use App\Http\Controllers\TourController;
|
|
//use Illuminate\Support\Facades\Route;
|
|
//
|
|
//// ------------------------------ index ------------------------------
|
|
//Route::get('/', [IndexController::class, 'index'])->name('index');
|
|
//
|
|
//// ------------------------------ tours (مثل products) ------------------------------
|
|
//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('{tour}', 'show')->name('show');
|
|
// });
|
|
//
|
|
//// json-suggestion-search (جستجوی پیشنهادی تورها)
|
|
//Route::get('tours/search/suggestion', [TourController::class, 'searchSuggestion'])
|
|
// ->name('tours.searchSuggestion');
|
|
//
|
|
//// ------------------------------ flights ------------------------------
|
|
//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::post('tours/{tour}/comments', [CommentController::class, 'store'])
|
|
// ->middleware('auth')->name('comments.store');
|
|
//
|
|
//// ------------------------------ علاقهمندیها ------------------------------
|
|
//Route::prefix('favorites')->name('favorites.')
|
|
// ->middleware('auth')->controller(SiteFavoriteController::class)
|
|
// ->group(function () {
|
|
// Route::get('/', 'index')->name('index');
|
|
// Route::post('toggle', 'toggle')->name('toggle'); // افزودن/حذف با ajax
|
|
// Route::get('clear', 'clear')->name('clear');
|
|
// });
|
|
//
|
|
//// ------------------------------ رزرو و پرداخت ------------------------------
|
|
//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('payment/{booking}/pay', [PaymentController::class, 'pay'])
|
|
// ->middleware('auth')->name('payment.pay');
|
|
//
|
|
//// ------------------------------ پنل شخصی کاربر ------------------------------
|
|
//Route::prefix('account')->name('account.')->middleware('auth')->group(function () {
|
|
//
|
|
// Route::get('/', [HomeController::class, 'index'])->name('index'); // داشبورد
|
|
// Route::get('bookings', [BookingController::class, 'index'])->name('bookings'); // رزروها
|
|
// Route::get('favorites', [FavoriteController::class, 'index'])->name('favorites');
|
|
// Route::get('comments', [CommentController::class, 'index'])->name('comments');
|
|
//
|
|
// Route::prefix('edit-profile')->name('edit-profile.')
|
|
// ->controller(EditProfileController::class)->group(function () {
|
|
// Route::get('/', 'index')->name('index');
|
|
// Route::post('/', 'post')->name('post');
|
|
// });
|
|
//});
|
|
//
|
|
//// ------------------------------ صفحات ثابت ------------------------------
|
|
//Route::get('/about', [PageController::class, 'about'])->name('about');
|
|
//Route::get('/contact', [PageController::class, 'contact'])->name('contact');
|
|
//Route::get('/faq', [PageController::class, 'faq'])->name('faq');
|