Started a flight view

This commit is contained in:
2026-04-06 11:49:54 +10:00
parent b53c92de36
commit 2ad8c65b86
2 changed files with 75 additions and 16 deletions
@@ -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,