DefaultValue
API reference › Model › Attribute › DefaultValue
Applies a runtime default when assigned input is null or an empty string.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$value readonly constructor | mixed | Runtime default value. | DefaultValue |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Configures the value applied to null or empty-string input. | DefaultValue |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(mixed $value)Configures the value applied to null or empty-string input.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | mixed | Runtime default value. |