Filament Table Group by key in JSON column of query

I have a json column in my MySQL DB. I can easily display the data in the table using . notation.

This works fine for display
TextColumn::make('json.key')->label('label')->sortable(),

When I try to make a group using . notation though it fails with the error getRelated() = null

->groups(['json.key'])

I have got a way to group it using

->groups([
Group::make('json')
->getTitleFromRecordUsing(fn(model $record): string => ucfirst($record->json->key))
->titlePrefixedWithLabel(false),
])


but it is not summarizing the rows per group but does summarize at the bottom of everything.
image.png
Was this page helpful?