Add optional() around aircraft info #824

This commit is contained in:
Nabeel Shahzad
2020-09-14 16:17:03 -04:00
parent 2dd3dd5814
commit 78ca06e9dc
3 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,10 @@
#
root = true
[*]
end_of_line = lf
insert_final_newline = true
[*.js]
indent_style = space
indent_size = 2

View File

@@ -30,7 +30,7 @@
</td>
<td>
@if($pirep->aircraft)
{{ $pirep->aircraft->name }}
{{ optional($pirep->aircraft)->name }}
@else
-
@endif

View File

@@ -8,8 +8,8 @@
<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($p->aircraft)
{{ $p->aircraft->name }}
@if(!empty($p->aircraft))
{{ optional($p->aircraft)->name }}
@endif
</td>
</tr>