Answer the question
In order to leave comments, you need to log in
Help with laravel-admin. content of multipleSelect not showing?
When editing an application ($form), the old data is not displayed in the multipleSelect field.
The code:
$form->multipleSelect('addWorks', 'Виды доп работы')
->options($addWork::all()->pluck('name', 'id'))
->help('Выбирать, только если есть доп работы.');
Answer the question
In order to leave comments, you need to log in
I figured it out myself, or rather I spied on the git of the Chinese.
I didn't specify in the question that it was a Many-to-Many relationship, and just had to rename the "relationship" from addWorks to add_works (snake_case ).
https://github.com/z-song/laravel-admin/issues/657
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question