F
Filament14mo ago
SLy

money() format on Infolist

How to remove trailling .00 from money() format on Infolist? Infolists\Components\TextEntry::make('price') ->label('Price') ->translateLabel() ->money(config('settings.currency')) ->color('secondary'), So I would like 250.00 to show as 250, but 250.12 should keep decimals.
2 Replies
SLy
SLyOP14mo ago
Thanks, I tried, but if I use numeric, the money format is overwritten so it shows without currency. I know I can use formatStateUsing, but I thought might be some more elegant default variant so I avoid using it on each money display. But is probably only option.
Want results from more Discord servers?
Add your server