Started a flight view

This commit is contained in:
dredgy committed 2026-04-06 11:49:54 +10:00
1 parent b53c92de36
commit 2ad8c65b86
2 files changed
+75 -16

No files matched your search

@@ -13,7 +13,17 @@ class FlightProfileController extends Controller
{
$user = User::whereRaw(DB::raw('LOWER(name) = ?'), [strtolower($username)])->firstOrFail();
$flights = UserFlight::where('user_id', $user->id)->get();
$flights = UserFlight::where('user_id', $user->id)
->with([
'departureAirport',
'arrivalAirport',
'airline',
'aircraft',
'seatType',
'flightReason',
'flightClass',
])
->get();
return Inertia::render('FlightProfile', [
'user' => $user,