Im using a table with static records and want to show a sum at the end of the table with the summarize method.
Here is my code:
return $table
->records(fn (self $livewire) => $livewire->data)
->selectable()
->columns([
TextColumn::make('name'),
TextColumn::make('amount')
->label('Betrag')
->money()
->color('primary')
->summarize(Sum::make()),
])
Here the error i get:
getTableSummarySelectedState(): Argument #1 ($query) must be of type Illuminate\Database\Eloquent\Builder, null given
The function needs a query instance to work but apparently there is none:
/**
* @return array<string, mixed>
*/
public function getTableSummarySelectedState(Builder $query, ?Closure $modifyQueryUsing = null): array