Karim98
Summarize JSON
How can I Sum a specific key in a JSON column?
Tables\Columns\TextColumn::make('extracted_data.total_characters')
->label('Characters')
->toggleable(isToggledHiddenByDefault: true)
->sortable()
->searchable()
->summarize(Summarizer::make()
->label('Total Characters')
->using(fn (Builder $query): string => $query->sum('extracted_data.total_characters'))),
10 replies