Fix pirep->ident usage issues (#1347)

* Update table.blade.php

* Update show.blade.php

* Update pirep_card.blade.php

* Update latest_pireps.blade.php

* Update ProfileController.php

Removed non used airports, added necessary relationships for eager loading.

Also removed `fields` 'cause it is already being loaded when `fields.field` is used. No need to query it twice.

* Update ProfileController.php
This commit is contained in:
B.Fatih KOZ
2021-11-09 00:08:19 +03:00
committed by GitHub
parent 358f0b663e
commit 2dbe19fdcc
5 changed files with 9 additions and 14 deletions

View File

@@ -2,15 +2,15 @@
@foreach($pireps as $p)
<tr>
<td style="padding-right: 10px;">
<span class="title">{{ $p->airline->code }} {{ $p->flight_number }}</span>
<span class="title">{{ $p->ident }}</span>
</td>
<td>
<a href="{{route('frontend.airports.show', [$p->dpt_airport_id])}}">{{$p->dpt_airport_id}}</a>
&nbsp;-&nbsp;
<a href="{{route('frontend.airports.show', [$p->arr_airport_id])}}">{{$p->arr_airport_id}}</a>&nbsp;
@if(!empty($p->aircraft))
{{ optional($p->aircraft)->registration }} ({{ $p->aircraft->icao }})
@endif
<a href="{{route('frontend.airports.show', [$p->arr_airport_id])}}">{{$p->arr_airport_id}}</a>
</td>
<td>
{{ optional($p->aircraft)->ident }}
</td>
</tr>
@endforeach