Table Filter With All Entries From DB Column
Hi,
I'm trying to set up a simple SelectFilter with a list of all the distinct values from the 'tag' column (which is a string - more like a typical laravel slug).
The filter is:
The result is attached - no tags are listed.
Any idea what I'm doing wrong?
5 Replies
I believe you need to use the options
and you can add
->multiple()
for multi choiceYourModel::query()->distinct()->pluck('tag', 'tag')
is how to do it with proper performanceUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
You're all stars! That worked. Thanks so much everyone.
And pass it in a closure too, sometimes it can cause multiple excessive queries
fn() => Certificate