tuyz
Belongs to Many multi-select values not coming in form data
I have a form inside a livewire component, i am trying to attach many categories to an item model.
the relationship of the categories to item is called categories, and the column name is category_name
return $form
->schema([
Select::make('categories')
->multiple()
->relationship(name: 'categories', titleAttribute: ' category_name')
->preload()
])->statePath('data')
->model(Item::class);
when i submit, i am not able to log the incoming categories. per the documentation, when submitting the form, filament will save them to the relationships pivot table. it does not do this, the incoming categories are null
2 replies