fix:change managing tours

This commit is contained in:
2026-08-22 11:15:20 +03:30
parent 11dd446ef4
commit 4599b5b52c
6 changed files with 205 additions and 13 deletions
+27 -6
View File
@@ -11,6 +11,8 @@ use App\Http\Controllers\FlightController;
use App\Http\Controllers\IndexController;
use App\Http\Controllers\TourController;
use Illuminate\Support\Facades\Route;
use Illuminate\Http\Request;
use Illuminate\Foundation\Auth\EmailVerificationRequest;
Route::get('/', [IndexController::class, 'index'])->name('index');
@@ -38,13 +40,35 @@ Route::controller(CommentController::class)
Route::post('/tours/{tour}/comments', 'tourStore')->name('tours.comments.store');
});
Route::get('/email/verify', function () {
return view('auth.verify-email');
})->middleware('auth')->name('verification.notice');
Route::get('/email/verify/{id}/{hash}', function (EmailVerificationRequest $request) {
$request->fulfill();
return redirect()->route('account.profile');
})->middleware(['auth', 'signed'])->name('verification.verify');
Route::post('/email/verification-notification', function (Request $request) {
$request->user()->sendEmailVerificationNotification();
return back()->with('message', 'لینک فعال سازی مجدداً ارسال شد.');
})->middleware(['auth', 'throttle:6,1'])->name('verification.send');
Route::prefix('account')->name('account.')->middleware('auth')->group(function () {
Route::get('profile', [ProfileController::class, 'index'])->name('profile');
Route::get('wishlist', [WishlistController::class, 'index'])
->name('wishlist');
Route::get('wishlist', [WishlistController::class, 'index'])->name('wishlist');
Route::prefix('edit-profile')->name('edit-profile.')->controller(EditProfileController::class)->group(function () {
@@ -52,10 +76,7 @@ Route::prefix('account')->name('account.')->middleware('auth')->group(function (
Route::put('/', 'post')->name('post');
});
Route::post(
'favorites/{type}/{id}/toggle',
[FavoriteController::class, 'toggle']
)->name('favorites.toggle');
Route::post('favorites/{type}/{id}/toggle', [FavoriteController::class, 'toggle'])->name('favorites.toggle');
Route::get('comments', [CommentStatusController::class, 'index'])
->name('comments');