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.
TextColumn::make('number')->label('Invoice');MoneyColumn::make('total')->label('Total')->currency('EUR')->sortable();MoneyColumn::make('refunded')->label('Refunded')->currencyField('currency');- actionsLabel:null
- bulkActions:[]
- data:[{"currency":"USD","number":"INV-1001","refunded":"0.00","total":"189.00"},{"currency":"GBP","number":"INV-1002","refunded":"49.50","total":"49.50"}]
- emptyLabel:null
- endpoint:null
- filters:[]
- layout:null
- lazy:false
- pagination:{"currentPage":null,"from":1,"hasMore":false,"lastPage":null,"mode":"none","nextPage":null,"perPage":null,"to":2,"total":2}
- perPageOptions:[]
- pinnableColumns:false
- query:{"filters":[],"mode":null,"page":1,"perPage":25,"search":"","sorts":[],"tableFilterIndicators":[],"tableFilters":{}}
- resizableColumns:false
- resizeIndicator:false
- searchable:false
- striped:false
- toolbar:[]
- align:"start"
- badge:null
- copyable:false
- date:null
- filter:null
- hiddenByDefault:false
- label:"Invoice"
- link:null
- multiple:null
- options:[]
- pinned:null
- sortable:false
- toggleable:false
- width:"md"
- align:"end"
- copyable:false
- currency:"EUR"
- currencyField:null
- filter:null
- hiddenByDefault:false
- label:"Total"
- maximumFractionDigits:null
- minimumFractionDigits:null
- options:[]
- pinned:null
- sortable:true
- toggleable:false
- width:"md"
- align:"end"
- copyable:false
- currency:null
- currencyField:"currency"
- filter:null
- hiddenByDefault:false
- label:"Refunded"
- maximumFractionDigits:null
- minimumFractionDigits:null
- options:[]
- pinned:null
- sortable:false
- toggleable:false
- width:"md"
->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.->copyable()adds a click-to-copy affordance. It copies the raw amount (1234.5), not the formatted currency string.
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.