Custom Detail
This feature is used to extend the detail field display. This can be implemented using the built-in display method that does not meet the requirements.
First define the extension class:
Then register the extension class in app/Admin/bootstrap.php
Then use this extension in the controller
The arguments passed to the unserialize()
method are passed to the UnSerialize::render()
method in order.
You can see several common properties in the parent class Ezadev\Admin\Show\AbstractField
.
Where $value
and $model
are the current field values and the current data model, which can be used to get the data you want in the render()
method.
$border
is used to control whether the current display content requires an outer border, and $escape
is used to set the current display content to be HTML-escaped.
Last updated