Skip to content

Money column

MoneyColumn is a numeric column rendered as currency. Symbol placement and the number of decimal places follow the viewer’s locale and the currency itself, so you feed it a plain amount. It is sortable and filters as a number.

MoneyColumn::make('total')->label('Total')->currency('EUR')->sortable();
MoneyColumn::make('refunded')->label('Refunded')->currencyField('currency');
  • ->currency('EUR') fixes one currency for the whole column.
  • ->currencyField('currency') reads each row’s currency code from another field — for a table whose rows are in different currencies.
MoneyColumn::make('price')->currency('USD');
MoneyColumn::make('amount')->currencyField('currency_code');

Like every numeric column, ->decimals($min, $max?) overrides the fraction digits when you need to depart from the currency’s default.