'string', 'name' => 'string', 'registration' => 'string', 'active' => 'boolean', ]; /** * Validation rules * * @var array */ public static $rules = [ 'icao' => 'required|max:5', 'name' => 'required', 'active' => '', ]; /** * foreign keys */ public function fares() { return $this->belongsToMany( 'App\Models\Fare', 'aircraft_fare' )->withPivot('price', 'cost', 'capacity'); } public function subfleet() { return $this->belongsTo('App\Models\Subfleet', 'subfleet_id'); } }