Expand description
Dashboard widgets: the stat cards and the latest-records tables a resource can show on the dashboard, and the panel’s own widgets.
A Stat is one card, as Filament’s Stat::make($label, $value) in a stats overview
widget: its label is the card’s title, its value the number shown, and an optional
description the line under it. A resource gives its cards with
IgniteResource::stats (or a runtime resource’s
RuntimeData::stats); the panel gives cards of its own with a
StatsOverviewWidget passed to Ignite::widget, as Filament’s panel widgets(). The
dashboard shows every card in a grid: the panel’s widgets first, in the order they were
added, then each resource’s, in the order of the navigation’s resources.
Structs§
- Form
Widget - A dashboard widget with a short form that creates a record of a resource, as a Filament
custom widget with a form: WordPress’s “Quick Draft” (a title, the content and “Save
Draft”). Pass it to
Ignite::form_widget. The form shows the resource’s fields (all of them, or the onesfieldsnames, in that order) and posts to the resource’s create route with the CSRF token, so the resource’s validation, policy andcreate_forrun as for its own form; the panel then comes back to the dashboard with the flash message. A form that does not validate shows the resource’s create form with its errors. The widget shows only to a user who may create a record of the resource. - Latest
Records - A dashboard table of the newest records of a resource (added in v1).
- List
Widget - A dashboard widget that lists rows under a title, as a Filament custom widget with its own
view: the rows of WordPress’s “Activity” or “Recently Published” box. Pass it to
Ignite::list_widget. The panel renders it with itspartials.widgets.listview (a theme can replace it), escaping every label, value and link. - List
Widget Row - One row of a
ListWidget: a label, an optional value beside it and an optional link, such as a post’s title linking to its edit form and its date as the value, as the rows of WordPress’s “Activity” and “Recently Published” boxes. - Stat
- One card of the dashboard, as Filament’s
Stat::make($label, $value): a title (the label), the number shown and an optional description under it, such as “3 drafts”. - Stat
Widget - One stat card on the dashboard: a label and a whole-number value.
Constants§
- DEFAULT_
EMPTY_ STATE - What a
ListWidgetshows when it has no rows, unless it sets its own.
Traits§
- Stats
Overview Widget - A widget of the panel’s own on the dashboard, as Filament’s
StatsOverviewWidgetwith itsgetStats(): the cards it computes for the signed-in user. Pass it toIgnite::widget.
Functions§
- safe_
url - Whether
urlis a path of this site or anhttp(s)URL, so a link cannot run script.