© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•15mo ago
Parsa jonz

Multiple Relationships

i just wanna know that is this the standard way to handle multiple relation ? i want to do a relation like this : admin -> user ->roles
there is 3 diffrent resource .

what i did is this and it woks so good but i just wanna make sure this is the currect way or not:
AdminResource forms
Grid::make('hi')
                    ->relationship('user')
                    ->schema([
                        Select::make('roles')
                            ->label(trans('user.roles'))
                            ->relationship('roles', 'name')
                            ->multiple()
                            ->preload()
                            ->searchable(),
                    ])->columnSpan(1),
            ])->columns(4);
Grid::make('hi')
                    ->relationship('user')
                    ->schema([
                        Select::make('roles')
                            ->label(trans('user.roles'))
                            ->relationship('roles', 'name')
                            ->multiple()
                            ->preload()
                            ->searchable(),
                    ])->columnSpan(1),
            ])->columns(4);

i have to repeat that : this code works perfectly i just wanna know is this standard and currect or not !
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

Multiple Relationships
FilamentFFilament / ❓┊help
12mo ago
multiple relationships with ->relationship()
FilamentFFilament / ❓┊help
3y ago
Multiple Select on Managing relationships
FilamentFFilament / ❓┊help
3y ago
Multiple levels of relationships and chatGPT
FilamentFFilament / ❓┊help
2y ago