Output PIREP map with just the dep/arr airports for now
This commit is contained in:
@@ -30,6 +30,7 @@ class Airport extends Model
|
||||
protected $casts = [
|
||||
'id' => 'string',
|
||||
];
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
@@ -42,7 +43,8 @@ class Airport extends Model
|
||||
/**
|
||||
* Some fancy callbacks
|
||||
*/
|
||||
protected static function boot() {
|
||||
protected static function boot()
|
||||
{
|
||||
|
||||
parent::boot();
|
||||
|
||||
@@ -54,4 +56,14 @@ class Airport extends Model
|
||||
$model->id = $model->icao;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Return full name like:
|
||||
* KJFK - John F Kennedy
|
||||
* @return string
|
||||
*/
|
||||
public function getFullNameAttribute(): string
|
||||
{
|
||||
return $this->icao . ' - ' . $this->name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,6 +131,11 @@ class Pirep extends Model
|
||||
return $this->user();
|
||||
}
|
||||
|
||||
public function route()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('App\Models\User', 'user_id');
|
||||
|
||||
Reference in New Issue
Block a user