SelectFilter relationship field
Hello all,
I have a users table, with a relation (HasOne) user_meta table. So the relationship is:
$user->meta->professional_category
That returns the professional category of the user.
So, why doesn't this filter work?
The output:
I don't know what I'm doing wrong. Must I run the query directly?
3 Replies
Also, to add that if I use:
The ouput is the same...
I don't think my method worked. I can't combine multilple selects. Can anyone help?
I’m guessing the issue is that the make on the SelectFilter is the name of your relationship and not the field name in the db. So you’re trying to relate a relationship to a relationship.
I got it to work, thanks @awcodes ! Here's how I got it:
Only when the data is selected is the filter triggered. Thanks 😁