From a0422899a56ee0d2875d057596370d87cf1f7076 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Tue, 3 Apr 2018 22:44:11 -0500 Subject: [PATCH] redesigning the pirep page a bit --- app/Models/Pirep.php | 4 ++-- .../layouts/default/pireps/show.blade.php | 21 ++++++++++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/app/Models/Pirep.php b/app/Models/Pirep.php index 5d72c725..06ac3656 100644 --- a/app/Models/Pirep.php +++ b/app/Models/Pirep.php @@ -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; diff --git a/resources/views/layouts/default/pireps/show.blade.php b/resources/views/layouts/default/pireps/show.blade.php index 5ebec3e7..5db3a78e 100644 --- a/resources/views/layouts/default/pireps/show.blade.php +++ b/resources/views/layouts/default/pireps/show.blade.php @@ -4,7 +4,26 @@ @section('content')
-

{{ $pirep->ident }}

+

{{$pirep->airline->code}}{{ $pirep->ident }}
+ Arrived {{$pirep->created_at->diffForHumans()}}

+
+ +
+

+ @if(filled($pirep->dpt_airport->iata)) + {{ $pirep->dpt_airport->iata }} + @endif + {{ $pirep->dpt_airport->location }} +

+

+ + {{ $pirep->dpt_airport->full_name }} ({{ $pirep->dpt_airport_id }}) +
+ {{ $pirep->created_at->toDayDateTimeString() }} +

+
+
+