class AsBinary implements Castable

Properties

bool $withoutObjectCaching
protected string $format

Methods

castUsing(array $arguments)

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

__construct(array $arguments)

Create a new binary cast instance.

string|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.

Details

at line 22
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

Exceptions

InvalidArgumentException

at line 33
__construct(array $arguments)

Create a new binary cast instance.

Parameters

array $arguments

at line 50
string|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

string|null

at line 68
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