Add more airlines and fix edit bugs
This commit is contained in:
@@ -19,4 +19,8 @@ class Aircraft extends Model
|
||||
protected $casts = [
|
||||
'engine_count' => 'integer',
|
||||
];
|
||||
|
||||
public function displayName() : string{
|
||||
return "{$this->manufacturer_code} {$this->model_full_name} ({$this->designator})";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,10 @@ class Airline extends Model
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
public function displayName() : string {
|
||||
return "{$this->name} ({$this->IATA_code}/{$this->ICAO_code})";
|
||||
}
|
||||
|
||||
public function country(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Country::class);
|
||||
|
||||
@@ -27,6 +27,10 @@ class Airport extends Model
|
||||
'elevation_ft' => 'integer',
|
||||
];
|
||||
|
||||
public function displayName() : string{
|
||||
return "{$this->municipality} / {$this->name} ({$this->iata_code}/{$this->icao_code})";
|
||||
}
|
||||
|
||||
public function region(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Region::class);
|
||||
|
||||
Reference in New Issue
Block a user