© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•11mo ago•
1 reply
fpolli

Table row grouping oddness

I am grouping rows by a field and a related field like so:
use Illuminate\Database\Eloquent\Builder;
return $table
      ->recordTitleAttribute('name')
      ->groups([
        Group::make('the_type')
        ->groupQueryUsing(fn (Builder $query) => $query->groupBy('the_type','user.initials'))
use Illuminate\Database\Eloquent\Builder;
return $table
      ->recordTitleAttribute('name')
      ->groups([
        Group::make('the_type')
        ->groupQueryUsing(fn (Builder $query) => $query->groupBy('the_type','user.initials'))

This works and groups the rows the way I want. Note it accepts an Eloquent Builder.

When I try to put a summarizer on one of the columns, however, it sends a Database\Query\Builder to the groupUsingQuery instead of an Eloquent Builder and throws an error. If I change the groupQueryUsing method to accept a Database Builder, it does not properly craft the SQL to include the users table for the users.initials field and throws an error.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

table row grouping options
FilamentFFilament / ❓┊help
2y ago
Table Grouping
FilamentFFilament / ❓┊help
16mo ago
grouping table with boolean
FilamentFFilament / ❓┊help
2y ago