Using the Laravel Administrator package and following the documentation at: http://administrator.frozennode.com/docs/fields#setter-option
Dealing with 2 Eloquent models:
- Manufacturer
- ManufacturerModel (a product of the manufacturer)
My goal is to be able to add a setter field to 'edit_fields' on the manufacturers page that will display a drop down of all manufacturers. This field will then be used in a custom action to re-assign all related ManufacturerModels to the Manufacturer selected form the list (in the event of a duplicate or variation in name). This list of Manufacturers will come from the same table as the selected eloquent model to edit.
Is anyone aware of a custom select that can be used here? I have tried the code below, but in either case, i get a text field rather than a drop down.
Custom select: (model config > edit_fields)
're_assign_models_to' => array(
'setter' => true,
'title' => 'Re-assign models to',
'select' => '(:table)',
'name_field' => 'name',
),
As well as setting the key as an accessor to return all Manufacturer Eloquent models:
model config > edit_fields
'all_manufacturers' => array(
'setter' => true,
'title' => 'Re-assign models to',
'name_field' => 'name',
),
In base model:
public function getAllManufacturers() { return Manufacturer::all(); }

Thanks! Any help you can provide would be greatly appreciated!