© 2026 Hedgehog Software, LLC

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

How to use nested relationship in SelectFilter?

I have State, City and Suburb models.

Suburb belongs to City, City belongs to State.

In table
TextColumn::make('city.state.name')
TextColumn::make('city.state.name')
is working fine.

But in table select filter I am getting following error.

SelectFilter::make('state')->relationship('city.state', 'name')
SelectFilter::make('state')->relationship('city.state', 'name')


Call to undefined method App\Models\Suburb::city.state()
Call to undefined method App\Models\Suburb::city.state()
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

SelectFilter relationship field
FilamentFFilament / ❓┊help
3y ago
Use attribute from `MorphOne` relationship in a SelectFilter
FilamentFFilament / ❓┊help
3y ago
How to customise title in SelectFilter loaded via relationship?
FilamentFFilament / ❓┊help
3y ago
Use Images in SelectFilter ?
FilamentFFilament / ❓┊help
3y ago