© 2026 Hedgehog Software, LLC

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

Relationship User & Role

i have 3 table
users
roles
user_role

user
1 UserA
2 UserB

role
1 Admin
2 Marketing

user_role
user_id role_id
1 1
1 2
2 2
meaning UserA have roles admin and marketing, User B just Marketing

Model
user
roles() with belongsToMany

I want select multiple dropdown in the User edit forms using Form Builder, i try using docs 2.x version
1. first problem cannot see roles for UserA or UserB
2. second problem, how to save to table user_role ?

my last code using native livewire using synch, can we done with filament? thank you before
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

User Relationship with Permissions
FilamentFFilament / ❓┊help
16mo ago
Update the user role
FilamentFFilament / ❓┊help
2y ago
disabledOn using user role
FilamentFFilament / ❓┊help
3y ago
Filament Shield Setup User Role
FilamentFFilament / ❓┊help
3y ago