Filter for unique values is not working

Hi there! I tried to create a filter for a table, and it didn't work:
Filter::make('is_unique')
->label('Unique')
->query(
fn (Builder $query): Builder => $query->select()->groupBy('phone')
)
Filter::make('is_unique')
->label('Unique')
->query(
fn (Builder $query): Builder => $query->select()->groupBy('phone')
)
2 Replies
awcodes
awcodes15mo ago
You’re not actually selecting anything.
Alex Manase
Alex ManaseOP15mo ago
I select all columns because the default for select() is [*]
Want results from more Discord servers?
Add your server