F
Filament11mo 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
AbiOP11mo ago
any advice on this would be very helpful
awcodes
awcodes11mo 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
AbiOP11mo ago
@awcodes tried that, still the same
No description
Want results from more Discord servers?
Add your server