Confused about multiple dashboards
According to the docs any page you add to
App/Filament/Pages
that extends Filament\Pages\Dashboard
will be available as a new dashboard. However, whatever I add breaks the admin with Route [filament.admin.pages.dashboard-one] not defined.
. I tried adding the pages explicitly to $panel->pages()
but the error remains. What am I missing?9 Replies
I'm not sure what is causing the issue but you may be able to use a regular page instead of a dashboard, as a workaround... You can add widgets to the page in
getHeaderWidgets()
.Thanks, actually I'm just checking out the new features and stumbled upon this issue and was wondering if I did something wrong. I don't really need it π
@gavthedev maybe try overriding routes() on the page so that it registers them to a different URL
so its different
im guessing the error is because the duplicate page is trying to register itself to the same URL, so the route is not defined and the error is caused
I have the same issue, i have created Admin and User dashboards, but both routes are registered to user one, and admin is reporting missing route. I have defined user and admin routes, but still having the route error.
So i am using same dashborad for both currently.
so you can override routes() like I said
Make sure you are using a closure with the
url()
when doing something like this:
Overriding routes() does the trick, thanks, but isn't the slug automatically generated from the page class name then? This would produce different slugs π€
I can confirm that route overriding works in my case too.
the slug cant be blank
hence why we dont use it in the overriden routes() method for the default dashboard
this should be documented though