What do you mean with "doesnt work". You get an error? its still single select? Something else?
Feb 20, 2025
4
Level 1
Multiple selection filter with relationship in FilamentPhp
Hi guys.
I'm faced with the following dilemma. I have created a select type filter and I would like it to be multiple(), that is, to be able to select multiple values.
The current filter is the following: SelectFilter::make('tutors') ->relationship('tutor', 'name') ->label('Tutor'),
According to the documentation, if we add the multiple() method, we should be able to select multiple options, but it doesn't work.
Could someone tell me how to do it?
Thanks
Level 102
@jmrufus Ah. It assumes you have a lot of options and does not show them for performance reasons. Try preloading
1 like
Please or to participate in this conversation.