F
Filament14mo ago
Oumaima

dashboard switch

I want to add a button in a dashboard , where I can switch between dashboard 1 and dashboard 2 , which will have differente widgets , but in the same panel , how can I do that please ?
1 Reply
DrByte
DrByte14mo ago
To do it within the same panel, you could add those dashboard Pages to your panel's ->pages() array. Or just place them into the namespaced directory in your ->discoverPages() directive so that it auto-discovers the dashboard there. Or, to switch between panels, in each panel definition, you could add a NavigationItem: eg:
$panel
->navigationItems([
NavigationItem::make('Go To Panel 2')
->url('/panel2')
->icon('heroicon-o-presentation-chart-line')
->group('')
->sort(30),
])
$panel
->navigationItems([
NavigationItem::make('Go To Panel 2')
->url('/panel2')
->icon('heroicon-o-presentation-chart-line')
->group('')
->sort(30),
])
Want results from more Discord servers?
Add your server