AsStringable
class AsStringable implements Castable
Methods
static CastsAttributes|CastsInboundAttributes|string
castUsing(array $arguments)
Get the caster class to use when casting from / to this cast target.
Stringable|null
string|null
bool
shouldCacheObject(Model $model, string $key, object $value)
Determine if the assigned object can be cached as the attribute value.
Details
at line 20
static CastsAttributes|CastsInboundAttributes|string
castUsing(array $arguments)
Get the caster class to use when casting from / to this cast target.
at line 26
Stringable|null
get(Model $model, string $key, mixed $value, array $attributes)
Cast the stored value to a stringable instance.
at line 34
string|null
set(Model $model, string $key, mixed $value, array $attributes)
Prepare the stringable value for storage.
at line 42
bool
shouldCacheObject(Model $model, string $key, object $value)
Determine if the assigned object can be cached as the attribute value.