vyuldashev / nova-permission

A Laravel Nova tool for Spatie's laravel-permission library
https://novapackages.com/packages/vyuldashev/nova-permission
419 stars 217 forks source link

Sidebar Group #133

Open amidesfahani opened 4 years ago

amidesfahani commented 4 years ago

hi please make it possible to change sidebar $group name from a config file. like: Users -- User -- Roles & Permissions

public static $group = 'Users';

thanks

rcubitto commented 4 years ago

I think you can publish the config files and change it from there (tag nova-permission-tool).

In my case, I have it in Spanish, so I changed resources/lang/vendor/nova-permission-tool/es/navigation.php. I changed it to Admin which was a group I already had and it worked.

cja-github commented 4 years ago

Hi. How do I "publish the config files"? (I'm new to Laravel.)

rcubitto commented 4 years ago

@cja-github try with php artisan vendor:publish --tag=nova-permission-tool

cja-github commented 4 years ago

That returned:

Unable to locate publishable resources.
Publishing complete.

Nothing has been changed in the file system.

rcubitto commented 4 years ago

@cja-github if you run php artisan vendor:publish alone, what are the options? Do you see it?

babul commented 4 years ago

php artisan vendor:publish --tag=nova-permission-tool-lang will publish the language resources in resources/lang/vendor/nova-permission-tool.

Edit your language(s) navigation.php in that folder to set your Sidebar Group.