FilamentF
Filament12mo ago
frame

Searchable by pivot name

In a relationmanager I have records with column name and a pivot column name. How do i make the table searchable by the pivot column? I already tried
Tables\Columns\TextColumn::make('name')->searchable() (column works, search doesn't),
Tables\Columns\TextColumn::make('pivot.name')->searchable() (column works, search doesn't) and
Tables\Columns\TextColumn::make('pivot_table_name.name')->searchable() (neither works).
Solution
Had to define searchable(['pivot_table_name.name']) instead
Was this page helpful?