Files
FlightsAPI/app/Models/Airport.php
T
2026-04-03 14:16:16 +10:00

34 lines
650 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',
'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);
}
}