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 root = true
[*]
end_of_line = lf
insert_final_newline = true
[*.js] [*.js]
indent_style = space indent_style = space
indent_size = 2 indent_size = 2

View File

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

View File

@@ -8,8 +8,8 @@
<a href="{{route('frontend.airports.show', [$p->dpt_airport_id])}}">{{$p->dpt_airport_id}}</a> <a href="{{route('frontend.airports.show', [$p->dpt_airport_id])}}">{{$p->dpt_airport_id}}</a>
&nbsp;-&nbsp; &nbsp;-&nbsp;
<a href="{{route('frontend.airports.show', [$p->arr_airport_id])}}">{{$p->arr_airport_id}}</a>&nbsp; <a href="{{route('frontend.airports.show', [$p->arr_airport_id])}}">{{$p->arr_airport_id}}</a>&nbsp;
@if($p->aircraft) @if(!empty($p->aircraft))
{{ $p->aircraft->name }} {{ optional($p->aircraft)->name }}
@endif @endif
</td> </td>
</tr> </tr>