Store data to pivot table
How do I call or store some data to my pivot_table
task_user
public static function form(Form $form): Form
{
return $form
->schema([
TextInput::make('title')->required(),
TextInput::make('description')->required(),
Forms\Components\MultiSelect::make('assignee_id')
->label('Assigned to')
->multiple()
->options(User::pluck('name', 'id')->toArray()),
TextInput::make('creator_id')
->label('Creator')
->default(auth()->user()->id)
->disabled()
->hint('Creator '.auth()->user()->name)
->hintIcon('tabler-info-circle'),
DatePicker::make('due_date')
->label('Due Date')
->minDate(now())
]);
}
So I want those assignee_id
to be store on my task_user
table
I did try this one out, and seems like I cant figure it out
https://filamentphp.com/docs/2.x/admin/resources/relation-managers#creating-with-pivot-attributesFilament
Relation managers - Resources - Admin Panel - Filament
The elegant TALL stack admin panel for Laravel artisans.
3 Replies