Resources

Widgets on resource pages

Show widgets above a list, or above a record.

getHeaderWidgets() shows widgets above a resource's list.

public static function getHeaderWidgets(): array
{
    return [OrderStats::class];
}
Stats above the orders listStats above the orders list

getRecordWidgets() shows them above a record, where a widget reads it from $this->record.

See dashboards for what a widget can be. See it in the demo.