© 2026 Hedgehog Software, LLC

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

Related record, pivot extra column values

I'm trying to understand what happens in save over with this:

Forms\Components\BelongsToManyMultiSelect::make('role')
->multiple()
->relationship('role','title',fn($query) => $query->where('title','!=','Super Admin'))
->options(Roles::all()->pluck('title', 'id')->toArray()),

It seems none of the model defaults are run, but the insert is raw SQL, so it's rather hard to hook into it to put some default values in place. Any pointers?

ps. was trying to understand this through form components/Select.php, which has this nice 400 line Christmas tree method called "relationship" without really too relevant comments. Uh. Any clue as to why the whole Filament source code is largely undocumented?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Pivot table with extra json column
FilamentFFilament / ❓┊help
3y ago
Displaying related pivot record details on table
FilamentFFilament / ❓┊help
2y ago
Wrong Pivot Values
FilamentFFilament / ❓┊help
15mo ago
Pivot Column Reorder
FilamentFFilament / ❓┊help
3y ago