Global navigation combined from multiple panels.
Is it possible to combine the navigation from multiple "sub" panels into a single app panel.
I have an App panel with this code:
And PanelNavigation:items() calls module facades to pull the navigation items from respective panels
The getNavigationItems from a facade / module gets the resource navitems with the following
I use the same navigation builder in each panel and the code works only when running the /admin panel.
When accessing the /app panel, the error is Route [filament.app.resources.companies.index] not defined.
It appears that CompanyResource::getNavigationItems() is using the App panel to build the route
Has anyone successfull built a global side nav with access to multiple panel resources?
Solution:Jump to solution
If anyone else comes across this, you can override the getUrl function in your resource and pass the panel ID, the url is then built correctly
CompanyResource.php
```
public static function getUrl(string $name = 'index', array $parameters = [], bool $isAbsolute = true, ?string $panel = null, ?Model $tenant = null): string...
1 Reply
Solution
If anyone else comes across this, you can override the getUrl function in your resource and pass the panel ID, the url is then built correctly
CompanyResource.php