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