$field->toBool()
Converts the field value into a proper boolean
Parameters
Name | Type | Default | Description |
---|---|---|---|
$default | bool |
false |
Default value if the field is empty |
Return type
bool
Aliases
You can use the following aliases for this field method in your template:
$field->bool(…)