© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
Jon Mason

Format number in stats widget?

I'm doing this and it works, but I want to format the value as currency. Any idea how I'd do that?

class ReportsOverview extends BaseWidget
{
    protected static ?string $pollingInterval = null;

    protected function getStats(): array
    {
        return [
            Stat::make('Total', CustomerDepositsReport::sum('amount_paid'));
        ];
    }
class ReportsOverview extends BaseWidget
{
    protected static ?string $pollingInterval = null;

    protected function getStats(): array
    {
        return [
            Stat::make('Total', CustomerDepositsReport::sum('amount_paid'));
        ];
    }
Solution
Try with
number_format()
number_format()
around the value
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Stats widget filter
FilamentFFilament / ❓┊help
12mo ago
Stats widget columns
FilamentFFilament / ❓┊help
2y ago
Stats overview widgets: number of widgets per row
FilamentFFilament / ❓┊help
3y ago
Overview Stats Widget Responsive
FilamentFFilament / ❓┊help
3y ago