F
Filament5mo ago
Igor

Summary with eloquent Accessor is possible ?

Hey there, I'm having some trouble summarizing a column in a price table. The prices in this column come from a custom attribute in my model (total), which is built using various columns from the database. As a result, I'm getting an error message saying that the column doesn't exist. Does anyone have any tips or tricks for how to work around this issue? Thanks!
Tables\Columns\TextColumn::make('total') ->label("Valor a pagar") ->sortable() ->money('BRL') ->summarize(Sum::make()->label("Valor Total")),
1 Reply
Brian Kidd
Brian Kidd5mo ago
I think this column will need to be at the database level that you can add using a addSelect in the query builder or a virtual database column.