class AsVector implements Castable

Properties

bool $withoutObjectCaching

Methods

castUsing(array $arguments)

Get the caster class to use when casting from / to this cast target.

array|null
get(Model $model, string $key, mixed $value, array $attributes)

Transform the attribute from the underlying model values.

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

Transform the attribute to its underlying model values.

bool
compare(Model $model, string $key, mixed $firstValue, mixed $secondValue)

Determine if the given values are equal.

Details

at line 26
static CastsAttributes|CastsInboundAttributes|string castUsing(array $arguments)

Get the caster class to use when casting from / to this cast target.

Parameters

array $arguments

Return Value

CastsAttributes|CastsInboundAttributes|string

at line 39
array|null get(Model $model, string $key, mixed $value, array $attributes)

Transform the attribute from the underlying model values.

Parameters

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

Return Value

array|null

Exceptions

JsonException

at line 71
array set(Model $model, string $key, mixed $value, array $attributes)

Transform the attribute to its underlying model values.

Parameters

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

Return Value

array

Exceptions

InvalidArgumentException
JsonException

at line 102
bool compare(Model $model, string $key, mixed $firstValue, mixed $secondValue)

Determine if the given values are equal.

Parameters

Model $model
string $key
mixed $firstValue
mixed $secondValue

Return Value

bool

Exceptions

JsonException