diff --git a/app/Http/Controllers/Frontend/ProfileController.php b/app/Http/Controllers/Frontend/ProfileController.php index c19e4b05..4ba55412 100644 --- a/app/Http/Controllers/Frontend/ProfileController.php +++ b/app/Http/Controllers/Frontend/ProfileController.php @@ -80,7 +80,7 @@ class ProfileController extends Controller public function show($id) { /** @var \App\Models\User $user */ - $user = User::with(['awards', 'fields', 'fields.field']) + $user = User::with('airline', 'awards', 'current_airport', 'fields.field', 'home_airport', 'last_pirep', 'rank') ->where('id', $id) ->first(); @@ -89,13 +89,11 @@ class ProfileController extends Controller return redirect(route('frontend.dashboard.index')); } - $airports = $this->airportRepo->all(); $userFields = $this->userRepo->getUserFields($user, true); return view('profile.index', [ 'user' => $user, 'userFields' => $userFields, - 'airports' => $airports, 'acars' => $this->acarsEnabled(), ]); } diff --git a/resources/views/layouts/default/dashboard/pirep_card.blade.php b/resources/views/layouts/default/dashboard/pirep_card.blade.php index 8f469672..d9625f09 100644 --- a/resources/views/layouts/default/dashboard/pirep_card.blade.php +++ b/resources/views/layouts/default/dashboard/pirep_card.blade.php @@ -2,8 +2,7 @@

- - {{ $pirep->airline->code }}{{ $pirep->ident }} + {{ $pirep->ident }} - {{ $pirep->dpt_airport->name }} (

diff --git a/resources/views/layouts/default/pireps/table.blade.php b/resources/views/layouts/default/pireps/table.blade.php index 114060b6..4ab44c9d 100644 --- a/resources/views/layouts/default/pireps/table.blade.php +++ b/resources/views/layouts/default/pireps/table.blade.php @@ -17,8 +17,7 @@ @foreach($pireps as $pirep) - {{ $pirep->airline->code }}{{ $pirep->ident }} + {{ $pirep->ident }} @if($pirep->dpt_airport){{ $pirep->dpt_airport->name }}@endif diff --git a/resources/views/layouts/default/widgets/latest_pireps.blade.php b/resources/views/layouts/default/widgets/latest_pireps.blade.php index fcaf5cfe..6cd0ea30 100644 --- a/resources/views/layouts/default/widgets/latest_pireps.blade.php +++ b/resources/views/layouts/default/widgets/latest_pireps.blade.php @@ -2,15 +2,15 @@ @foreach($pireps as $p) - {{ $p->airline->code }} {{ $p->flight_number }} + {{ $p->ident }} {{$p->dpt_airport_id}}  -  - {{$p->arr_airport_id}}  - @if(!empty($p->aircraft)) - {{ optional($p->aircraft)->registration }} ({{ $p->aircraft->icao }}) - @endif + {{$p->arr_airport_id}} + + + {{ optional($p->aircraft)->ident }} @endforeach