Add airports
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class Airport extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'type',
|
||||
'name',
|
||||
'latitude_deg',
|
||||
'longitude_deg',
|
||||
'elevation_ft',
|
||||
'region_id',
|
||||
'municipality',
|
||||
'icao_code',
|
||||
'iata_code',
|
||||
'local_code',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'latitude_deg' => 'float',
|
||||
'longitude_deg' => 'float',
|
||||
'elevation_ft' => 'integer',
|
||||
];
|
||||
|
||||
public function region(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Region::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user