auth()->id(), 'flight_id' => $flight->id, 'tour_id' => null, 'tracking_code' => strtoupper(Str::random(10)), 'status' => BookingStatus::PENDING, 'created_at' => now(), ]); return redirect() ->route('account.booking') ->with('success', 'پرواز با موفقیت رزرو شد.'); } public function storeTour(Tour $tour) { Booking::create([ 'user_id' => auth()->id(), 'flight_id' => null, 'tour_id' => $tour->id, 'tracking_code' => strtoupper(Str::random(10)), 'status' => BookingStatus::PENDING, 'created_at' => now(), ]); return redirect() ->route('account.booking') ->with('success', 'تور با موفقیت رزرو شد.'); } public function index() { $bookings = Booking::with([ 'flight.airline', 'flight.departureAirport.city', 'flight.arrivalAirport.city', 'tour', ]) ->where('user_id', auth()->id()) ->latest('created_at') ->paginate(15); return view('account.booking', compact('bookings')); } }