Download the PHP package lizhineng/nova-permission-tool without Composer
On this page you can find all versions of the php package lizhineng/nova-permission-tool. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lizhineng/nova-permission-tool
More information about lizhineng/nova-permission-tool
Files in lizhineng/nova-permission-tool
Package nova-permission-tool
Short Description A Laravel Nova tool based on Spatie permission package.
License MIT
Informations about the package nova-permission-tool
Laravel Nova Permission Tool
This is a Laravel Nova tool based on Spatie permission package which lets you:
- List all roles and permissions
- List permissions by role
- List roles by permissions
- List users by roles & permissions
- CRUD roles & permissions
Built-in filters
- Guard Name Filter
Installation
You can install the package in to a Laravel app that uses Nova via composer:
Next up, you must register the tool with Nova. This is typically done in the tools
method of the NovaServiceProvider
.
You can publish the lang files and config file with:
When published, the config file is located at /config/permission-tool.php
, and the lang files are localed at /resource/lang/vendor/permission-tool
.
Usage
Click on the "Access Control" menu item in your Nova app to see the tool provided by this package.
Config
Currently there is only one option can be edited in this package.
When you checkout the role/permission resource detail page, it will show you the users who has the role/permission below. The models.user
option is to tell us which Eloquent model should be used to retrieve your users, and it must be a Laravel Nova resource model.
Attach to users detail page
Thanks to Nova, that's pretty easy to attach roles fields or permissions fields to users detail page.
And don't forget to use Spatie\Permission\Traits\HasRoles
trait to your User model.
Localization
The package is supported the following languages:
- English
- Simplified Chinese
When you publish the package lang files, you can make your own translation in /resource/vendor/permission-tool/{locale}
.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.