laravel-datatables-editor
laravel-datatables-editor copied to clipboard
Fill select box options
Hello!
I have a datatable 'pos' with editor. It is joined via '$this->belongsTo('App\Facility');'. This is working, I can display the name of the facility of that pos refering it by 'facility.name' in DataTables.
But I can't find any useful information on how to setup a selectbox for that field. The selectbox should be filled with all the entries of the field 'facilities.name', getting its value from 'facilities.id', set the 'selected' option of the select box to 'pos.facility_id' and store the value in that same field, when 'save' is clicked.
I am trying to figure this out with https://editor.datatables.net/manual/php/joins but could't get anywhere yet.
Any documentation and / or tutorial for this?
tia & cu, ada