chore: finalize project updates
This commit is contained in:
+45
-333
@@ -1,377 +1,89 @@
|
||||
<?php
|
||||
|
||||
|
||||
use App\Http\Controllers\Account\BookingController;
|
||||
use App\Http\Controllers\Account\CommentController as AccountCommentController;
|
||||
use App\Http\Controllers\Account\EditProfileController;
|
||||
use App\Http\Controllers\Account\FavoriteController;
|
||||
use App\Http\Controllers\Account\FavoriteController as AccountFavoriteController;
|
||||
use App\Http\Controllers\BookingController as SiteBookingController;
|
||||
use App\Http\Controllers\CommentController;
|
||||
use App\Http\Controllers\FavoriteController;
|
||||
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)
|
||||
// ------------------------------ تورها ------------------------------
|
||||
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('search/suggestion', 'searchSuggestion')->name('searchSuggestion');
|
||||
Route::get('{tour}', 'show')->name('show');
|
||||
});
|
||||
|
||||
// ------------------------------ flights ------------------------------
|
||||
Route::prefix('flights')->name('flights.')->controller(FlightController::class)
|
||||
// ------------------------------ پروازها ------------------------------
|
||||
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)
|
||||
// ------------------------------ نظرات (پلیمورفیک) ------------------------------
|
||||
Route::prefix('comments')
|
||||
->name('comments.')
|
||||
->middleware('auth')
|
||||
->controller(AccountCommentController::class) // اصلاح شد: استفاده از کنترلر صحیح
|
||||
->group(function () {
|
||||
Route::get('/', 'index')->name('index');
|
||||
Route::post('toggle', 'toggle')->name('toggle'); // افزودن/حذف با ajax
|
||||
Route::get('clear', 'clear')->name('clear');
|
||||
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::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.')
|
||||
// ------------------------------ پنل کاربری ------------------------------
|
||||
Route::prefix('account')
|
||||
->name('account.')
|
||||
->middleware('auth')
|
||||
->group(function () {
|
||||
|
||||
// 🔥 تغییر اینجا: بهجای HomeController از IndexController
|
||||
Route::get('/', [IndexController::class, 'index'])->name('index'); // داشبورد
|
||||
Route::get('/', [IndexController::class, 'index'])->name('index');
|
||||
|
||||
Route::controller(BookingController::class)->group(function () {
|
||||
Route::get('bookings', 'index')->name('bookings'); // رزروها
|
||||
});
|
||||
// علاقهمندیها
|
||||
Route::get('favorites', [AccountFavoriteController::class, 'index'])->name('favorites');
|
||||
|
||||
Route::controller(FavoriteController::class)->group(function () {
|
||||
Route::get('favorites', 'index')->name('favorites');
|
||||
});
|
||||
// نظرات
|
||||
Route::get('comments', [AccountCommentController::class, 'myComments'])->name('comments');
|
||||
|
||||
Route::prefix('edit-profile')->name('edit-profile.')
|
||||
->controller(EditProfileController::class)->group(function () {
|
||||
// پروفایل
|
||||
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');
|
||||
|
||||
Reference in New Issue
Block a user