页面 · Laravilt
Page Widgets & Actions
Add widgets, header actions, subheadings and breadcrumbs to pages.
Page with Widgets
Return widget classes or instances from getWidgets(). They render above the page content, and stat widgets are grouped into one stats row.
php
Customizing the Dashboard
The generated app/Laravilt/{Panel}/Pages/Dashboard.php extends Laravilt\Panel\Pages\Dashboard. By default it shows a stats row with a record count for each resource. Override getWidgets() to add your own widgets:
php
A resource can opt out of the automatic stats with protected static bool $showOnDashboard = false;.
Header Actions
php
Subheading
php
Breadcrumbs
Breadcrumbs are built automatically from the panel dashboard, cluster or navigation group, and page title. Override getBreadcrumbs() to replace them:
php