$field->data()
Deprecated
in 5.0.0
Use ::toStoredValue()
instead to receivethe value in the format that will be needed for content files.
If you need to get the value with the default as fallback, you should use
the fill method first
$field->fill($field->default())->toStoredValue()
$field->data(bool $default = false): mixed
Parameters
Name | Type | Default |
---|---|---|
$default | bool |
false
|
Return type
mixed
This method modifies the existing $field
object it is applied to and returns it again.