© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
9 replies
H.Bilbao

Dependant select with multiple options

I have 2 select where I can select several options and both are many to many with a polymorphic relationship.
Right now the second does not depend on the first and it is what I need. Would it be possible?

Actual code:
Select::make('nationable')
    ->relationship(name: 'nations', titleAttribute: 'name')
    ->searchable()
    ->preload()
    ->multiple()
    ->required(),

Select::make('champable')
    ->relationship(name: 'championships', titleAttribute: 'name')
    ->searchable()
    ->preload()
    ->multiple()
    ->required(),
Select::make('nationable')
    ->relationship(name: 'nations', titleAttribute: 'name')
    ->searchable()
    ->preload()
    ->multiple()
    ->required(),

Select::make('champable')
    ->relationship(name: 'championships', titleAttribute: 'name')
    ->searchable()
    ->preload()
    ->multiple()
    ->required(),
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

Dependant select options using QueryBuilder
FilamentFFilament / ❓┊help
2y ago
Show loading on dependant select options
FilamentFFilament / ❓┊help
3y ago
Dependant Select
FilamentFFilament / ❓┊help
3y ago
Dependant select with BelongsToMany relation
FilamentFFilament / ❓┊help
3y ago