redesigning the pirep page a bit

This commit is contained in:
Nabeel Shahzad 2018-04-03 22:44:11 -05:00
parent 6fb66a1d80
commit a0422899a5
2 changed files with 22 additions and 3 deletions

View File

@ -113,8 +113,8 @@ class Pirep extends Model
*/
public function getIdentAttribute(): string
{
$flight_id = $this->airline->code;
$flight_id .= $this->flight_number;
#$flight_id = $this->airline->code;
$flight_id = $this->flight_number;
if (filled($this->route_code)) {
$flight_id .= '/C'.$this->route_code;

View File

@ -4,7 +4,26 @@
@section('content')
<div class="row">
<div class="col-12">
<h2>{{ $pirep->ident }}</h2>
<h3>{{$pirep->airline->code}}{{ $pirep->ident }}<br />
<small>Arrived {{$pirep->created_at->diffForHumans()}}</small></h3>
</div>
<div class="col-6 text-left">
<h4>
@if(filled($pirep->dpt_airport->iata))
{{ $pirep->dpt_airport->iata }}
@endif
<small>{{ $pirep->dpt_airport->location }}</small>
</h4>
<p>
<a href="{{route('frontend.airports.show', ['id' => $pirep->dpt_airport_id])}}">
{{ $pirep->dpt_airport->full_name }} ({{ $pirep->dpt_airport_id }})</a>
<br />
{{ $pirep->created_at->toDayDateTimeString() }}
</p>
</div>
<div class="col-6">
</div>
</div>