Recipe: MoneyColumn
Display currency amounts with cents storage and ISO 4217 codes
What / When
Use MoneyColumn when cells are monetary amounts. Prefer it over NumberColumn plus custom JS.
Minimal Example
use Pentiminax\UX\DataTables\Column\MoneyColumn;
use Pentiminax\UX\DataTables\Column\TextColumn;
public function configureColumns(): iterable
{
yield TextColumn::new('name', 'Product');
yield MoneyColumn::new('price', 'Price')
->setField('priceInCents') // e.g. 1999 → €19.99
->currency('EUR')
->storedAsCents();
}