I want to add a custom select input for a column that doesn't exist in my model.
My Model ist something like this
MyModel.php
id
name
but in create form want to to show a select('template') so that I can do some extra steps after saving the model.
I have now error Column not found: 1054 Unknown column 'xxx' in 'field list' when submit the form.
Anyone knows how to archive this?
Use $form->ignore(['column']); to ignore columns that doesn't exist in table.
@z-song yes, I know I can do it, but then I can't access the value of that field in my callback anymore, I created a pull request to solve my problem, hope you have time to take a look: https://github.com/z-song/laravel-admin/pull/765
Merged, Thanks!
Most helpful comment
Use
$form->ignore(['column']);to ignore columns that doesn't exist in table.