35 lines
670 B
PHP
35 lines
670 B
PHP
<?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',
|
|
'timezone',
|
|
'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);
|
|
}
|
|
}
|