interface Illuminate / Contracts / Database / Eloquent / SerializesCastableAttributes
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

SerializesCastableAttributes

Methods

public

serialize ( Model $model , string $key , mixed $value , array $attributes ) : mixed

Serialize the attribute when converting the model to an array.

Parameters

  • $model Model
  • $key string
  • $value mixed
  • $attributes array