© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
Trauma Zombie

Is it possible to make searchable column on relation?

Hi guys, is it possible to search on table on relation?
Tables\Columns\TextColumn::make('clientable.name')
    ->label(__('Name'))
    ->icon(fn (Client $record) => match($record->clientable->getMorphClass()) {
        'person' => 'heroicon-o-user',
        'company' => 'heroicon-o-building-library',
    })
    ->searchable(['clientable.name']),
Tables\Columns\TextColumn::make('clientable.name')
    ->label(__('Name'))
    ->icon(fn (Client $record) => match($record->clientable->getMorphClass()) {
        'person' => 'heroicon-o-user',
        'company' => 'heroicon-o-building-library',
    })
    ->searchable(['clientable.name']),
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

Is sortable() and/or searchable() possible on a HasOneThrough relation?
FilamentFFilament / ❓┊help
16mo ago
Is it possible to make the toggle column dropdown scrollable?
FilamentFFilament / ❓┊help
2y ago
Is it possible to make relationship tabs vertical?
FilamentFFilament / ❓┊help
5mo ago
Is it possible to make nested relationship forms?
FilamentFFilament / ❓┊help
2y ago