© 2026 Hedgehog Software, LLC

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

Select Column relationship in Table.

I'm currently populating the select using the options closure:
Tables\Columns\SelectColumn::make('currency_id')
                    ->label('Currency')
                    ->options(fn (Currency $currency) => $currency->pluck('name', 'id'))
Tables\Columns\SelectColumn::make('currency_id')
                    ->label('Currency')
                    ->options(fn (Currency $currency) => $currency->pluck('name', 'id'))


But do we have a way to access a relationship like as in the Form Builder?:
Forms\Components\Select::make('currency_id')
                    ->relationship(name: 'currency', titleAttribute: 'name')
Forms\Components\Select::make('currency_id')
                    ->relationship(name: 'currency', titleAttribute: 'name')


Is there a better way to do this?
Solution
There doesn't seem to be an available relationship. You could continue using the 'options' method

SelectColumn::make('currency_id')
    ->options(Currency::pluck('name', 'id'))
SelectColumn::make('currency_id')
    ->options(Currency::pluck('name', 'id'))
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

JSON relationship column in table
FilamentFFilament / ❓┊help
14mo ago
Display relationship on table column
FilamentFFilament / ❓┊help
3y ago
One column per relationship model in table
FilamentFFilament / ❓┊help
3y ago
Select ->relationship table not found.
FilamentFFilament / ❓┊help
3y ago