© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
mcdc

Store data to pivot table

How do I call or store some data to my pivot_table
task_user
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())
            ]);
    }
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
assignee_id
to be store on my
task_user
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-attributes
Filament
Relation managers - Resources - Admin Panel - Filament
The elegant TALL stack admin panel for Laravel artisans.
Relation managers - Resources - Admin Panel - Filament
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Update data on pivot table
FilamentFFilament / ❓┊help
2y ago
Insert Data in Pivot Table
FilamentFFilament / ❓┊help
3y ago
Insert data to a pivot table in table CreateAction?
FilamentFFilament / ❓┊help
2y ago
Pivot data in model/resource table
FilamentFFilament / ❓┊help
2y ago