Skip to main content
You are currently viewing the documentation for Filament 2.x, which is a previous version of Filament.Looking for the current stable version? Visit the 5.x documentation.

Getting started

Filament comes with a “stats overview” widget template, which you can use to display a number of different stats in a single widget, without needing to write a custom view. Start by creating a widget with the command:
Then return Card instances from the getCards() method:
Now, check out your widget in the dashboard.

Card descriptions and icons

You may add a description() to provide additional information, along with a descriptionIcon():

Card colors

You may also give cards a color() (primary, success, warning or danger):

Card extra HTML attributes

You may also pass extra HTML attributes to cards using extraAttributes():

Card charts

You may also add or chain a chart() to each card to provide historical data. The chart() method accepts an array of data points to plot:

Live updating (polling)

By default, stats overview widgets refresh their data every 5 seconds. To customize this, you may override the $pollingInterval property on the class to a new interval:
Alternatively, you may disable polling altogether: