path filament plugin in navigation menu

what are the paths of filament plugins? i want to list them in the adminserviceprovider,
Solution:
``` ->navigation(function (NavigationBuilder $builder): NavigationBuilder { return $builder->groups([ NavigationGroup::make('Content') ->items([ ...ArticleResource::getNavigationItems(),...
Jump to solution
8 Replies
skyrowl
skyrowl2mo ago
It depends on the plugin, every plugins are PHP packages located in the vendor folder Tho I don't know if there's an easy way to retrieve all of those knowing that many of those don't even need registration in the panels
raheel3031
raheel3031OP2mo ago
It is the curator plug-in I want to know the path of.
awcodes
awcodes2mo ago
Vendor/awcodes/filament-curator packages will always be in the vendor folder under the author then the package name. But not sure how that solves your question. Sounds like you need to run a composer command to see what packages have filament as a dependency then list them from there. What do you need the paths for?
raheel3031
raheel3031OP2mo ago
To control the menu items from adminPanelProvider. You have to define the path of plugins like curator in there. So you have navigation items there and u have to define the url
awcodes
awcodes2mo ago
You should be defining those off the resource. So like MediaResource::getUrl(‘index’) in the case of the Curator media resource. Is this a custom navigation? Because including the CuratorPlugin in the plugins array on the panel will automatically include it in the navigation.
raheel3031
raheel3031OP2mo ago
I will share the code here
Solution
raheel3031
raheel30312mo ago
->navigation(function (NavigationBuilder $builder): NavigationBuilder {
return $builder->groups([
NavigationGroup::make('Content')
->items([
...ArticleResource::getNavigationItems(),
...CategoryResource::getNavigationItems(),
...PageResource::getNavigationItems(),
NavigationItem::make('Media')
->icon('heroicon-o-photo')
->url(route('admin/media')),
]),

NavigationGroup::make('Settings')
->items([
...UserResource::getNavigationItems(),
]),

NavigationGroup::make('Shop')
->items([
...CollectionResource::getNavigationItems(),
]),
]);
})
->navigation(function (NavigationBuilder $builder): NavigationBuilder {
return $builder->groups([
NavigationGroup::make('Content')
->items([
...ArticleResource::getNavigationItems(),
...CategoryResource::getNavigationItems(),
...PageResource::getNavigationItems(),
NavigationItem::make('Media')
->icon('heroicon-o-photo')
->url(route('admin/media')),
]),

NavigationGroup::make('Settings')
->items([
...UserResource::getNavigationItems(),
]),

NavigationGroup::make('Shop')
->items([
...CollectionResource::getNavigationItems(),
]),
]);
})
raheel3031
raheel3031OP2mo ago
It's solved
Want results from more Discord servers?
Add your server