interface SerializesCastableAttributes (View source)

Methods

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

Serialize the attribute when converting the model to an array.

Details

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

Serialize the attribute when converting the model to an array.

Parameters

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

Return Value

mixed