Sum summarizer not respecting MoneyCast in table output
I'm following along with the 'Getting Started' tutorial and trying out table summaries but seem to have hit a problem. The summary is summing up the integer amounts from the
price
column but I want to display it as dictated in MoneyCast
(2DP), - can this be done on a summarizer?
Loving Filament so far, by the way! 😉
3 Replies
There is also a divideBy argument for money() that allows you to divide the original value by a number before formatting it. This could be useful if your database stores the price in cents, for example:See: https://filamentphp.com/docs/3.x/tables/summaries#currency-formatting
It’s still just OOP, if you need something specific to your use case there no reason you can’t override the base class to return exactly what you need.
Perfect - thanks!