'string', 'name' => 'string', 'price' => 'float', 'cost' => 'float', 'notes' => 'string', 'active' => 'boolean', ]; /** * Validation rules * * @var array */ public static $rules = [ 'code' => 'required', 'name' => 'required', ]; public function aircraft() { return $this->belongsToMany( 'App\Models\Aircraft', 'aircraft_fare' )->withPivot('price', 'cost', 'capacity'); } }