How to Position Package Resources?

Hi everyone, how would i position the resource for a package I have here within my AdminPanelProvider?

->plugins([
CuratorPlugin::make(),
EnvironmentIndicatorPlugin::make()
->showBadge(false)
->showBorder(true)
->color(fn () => match (app()->environment()) {
'production' => Color::hex('#dc2626'),
'staging' => Color::hex('#ea580c'),
default => Color::hex('#2563eb'),
}),
FilamentNavigation::make(),
FilamentUsersPlugin::make(),
FilamentSpatieRolesPermissionsPlugin::make()
]);

->plugins([
CuratorPlugin::make(),
EnvironmentIndicatorPlugin::make()
->showBadge(false)
->showBorder(true)
->color(fn () => match (app()->environment()) {
'production' => Color::hex('#dc2626'),
'staging' => Color::hex('#ea580c'),
default => Color::hex('#2563eb'),
}),
FilamentNavigation::make(),
FilamentUsersPlugin::make(),
FilamentSpatieRolesPermissionsPlugin::make()
]);
I would like to change the position of the FilamentSpatieRolesPermissionsPlugin resource by doing something similar to this if possible:
FilamentSpatieRolesPermissionsPlugin::make()
->position(3)
FilamentSpatieRolesPermissionsPlugin::make()
->position(3)
I know you can go directly into resources and just do the following:
protected static ?int $navigationSort = 3;
protected static ?int $navigationSort = 3;
but I wasn't sure if there is an alternative way it can be done in within AdminPanelProvider.
2 Replies
awcodes
awcodes14mo ago
unless the plugin provides a method to change the navigation sort you have to do it in the resource. like Curator has a ->navigationSort() method that does this. but it has to be provided by the plugin. it's not automatic
nathan269_
nathan269_OP14mo ago
ah i see, no problem. Thanks for the quick response!
Want results from more Discord servers?
Add your server