Files
sogandAsghary.Project09/app/Models/Airport.php
T
2026-08-15 13:29:00 -07:00

42 lines
646 B
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Airport
*
* @property int $id
* @property string $name
* @property string $city
* @property string $country
* @property string $code
*
* @property Collection|Flight[] $flights
*
* @package App\Models
*/
class Airport extends Model
{
protected $table = 'airports';
public $timestamps = false;
protected $fillable = [
'name',
'city',
'country',
'code'
];
public function flights()
{
return $this->hasMany(Flight::class, 'departure_airport_id');
}
}