Karim98
Karim98
FFilament
Created by Karim98 on 10/11/2023 in #❓┊help
Summarize JSON
Here's the solution: Tables\Columns\TextColumn::make('extracted_data.translated_characters') ->label('Translate Characters') ->toggleable(isToggledHiddenByDefault: true) ->summarize( Summarizer::make() ->label('Translate Characters') ->using(function () { $records = Request::all()->where('type', 'Translate'); $translateSum = $records->sum(function ($record) { $extractedData = $record->extracted_data; return $extractedData['translated_characters'] ?? 0; }); return $translateSum; }) ),
10 replies
FFilament
Created by Karim98 on 10/11/2023 in #❓┊help
Summarize JSON
I really appreciate your help but I think this is not what I am looking for, Lets say I got the state, How can I show them as a Summary of all of the rows summed together?
10 replies
FFilament
Created by Karim98 on 10/11/2023 in #❓┊help
Summarize JSON
Can you show an example?
10 replies
FFilament
Created by Karim98 on 10/11/2023 in #❓┊help
Summarize JSON
I can't find something called ->getStateUsing, I only found ->getState()
10 replies