Custom view
Replace field slots with custom views
Display a custom view instead of the default field view
The view will have access to
$field
,$form
,$form_data
, and$model
variables, as well as any other public component properties.Alternatively use Field Slots
//Custom view slots
view(string $blade_view_to_include)
beforeView(string $blade_view_to_include)
afterView(string $blade_view_to_include)
afterLabelView(string $blade_view_to_include)
Input::make('My custom field', 'customProperty')
->custom()
->view('path.mybladeview')
->rule('required'),
Input::make('Custom Field')->view('fields.custom-field');
Protip: use the ->custom()
field method, together with a custom ->view.()
See Manually saving data for more info
Last updated
Was this helpful?