$field->callback()
Applies the callback function to the field
$field->callback(Closure $callback)
Parameters
Name | Type | Default | Description |
---|---|---|---|
$callback |
Closure |
– |
Example
echo $page->title()->callback(function ($field) {
$field->value = 'Title: ' . $field->value;
return $field;
});