F
Filament6mo ago
Abi

Adding a filter on a RelationManager Table with `relationship` doesn't work

On a RelationManger class, I have added a SelectFilter to the table and using the relationship method to fill the Select Filter. But it doesn't seem to fill the Select.
Tables\Filters\SelectFilter::make('Option 1')
->relationship('option1', 'key')
->attribute('option_1_value'),
Tables\Filters\SelectFilter::make('Option 1')
->relationship('option1', 'key')
->attribute('option_1_value'),
The option1 is a BelongsTo relationship added on the model.
3 Replies
Abi
Abi6mo ago
any advice on this would be very helpful
awcodes
awcodes6mo ago
I think maybe the make() needs to not have spaces in it. Typically it would be the name of the field on the record. Ie option_1_id
Abi
Abi6mo ago
@awcodes tried that, still the same
No description