PHPackages                             lizhineng/nova-permission-tool - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. lizhineng/nova-permission-tool

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

lizhineng/nova-permission-tool
==============================

A Laravel Nova tool based on Spatie permission package.

v2.0.0(6y ago)45.4k2[1 issues](https://github.com/lizhineng/nova-permission-tool/issues)MITPHPPHP ^7.2

Since Aug 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/lizhineng/nova-permission-tool)[ Packagist](https://packagist.org/packages/lizhineng/nova-permission-tool)[ RSS](/packages/lizhineng-nova-permission-tool/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Laravel Nova Permission Tool
============================

[](#laravel-nova-permission-tool)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f25b5416d72bcbf56abf0d9d6e42f70733261fb448a07fab1a4ce14121c5b4be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c697a68696e656e672f6e6f76612d7065726d697373696f6e2d746f6f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lizhineng/nova-permission-tool)[![Total Downloads](https://camo.githubusercontent.com/a266525c07960a3a4b5c86e9563ea5767d04a57769def078d3aea682d5cca199/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c697a68696e656e672f6e6f76612d7065726d697373696f6e2d746f6f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lizhineng/nova-permission-tool)[![StyleCI](https://camo.githubusercontent.com/bc4ccb0e95c5042399f15a9c7b703c663b2291131208c4d2c5887ef3864791b3/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3134363237333838372f736869656c643f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/bc4ccb0e95c5042399f15a9c7b703c663b2291131208c4d2c5887ef3864791b3/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3134363237333838372f736869656c643f6272616e63683d6d6173746572)[![MIT license](https://camo.githubusercontent.com/7123c32787e013be5a8a13598ad01f562754637ed6141e89b02e85bf16d3e63e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/7123c32787e013be5a8a13598ad01f562754637ed6141e89b02e85bf16d3e63e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e7376673f7374796c653d666c61742d737175617265)

This is a Laravel Nova tool based on [Spatie permission package](https://github.com/spatie/laravel-permission) which lets you:

- List all roles and permissions
- List permissions by role
- List roles by permissions
- List users by roles &amp; permissions
- CRUD roles &amp; permissions

#### Built-in filters

[](#built-in-filters)

- Guard Name Filter

[![screenshot of the permission tool](https://raw.githubusercontent.com/lizhineng/nova-permission-tool/master/docs/screenshot.png)](https://raw.githubusercontent.com/lizhineng/nova-permission-tool/master/docs/screenshot.png)

Installation
------------

[](#installation)

You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:

```
composer require lizhineng/nova-permission-tool
```

Next up, you must register the tool with Nova. This is typically done in the `tools` method of the `NovaServiceProvider`.

```
// in app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
    return [
        // ...
        new \Lizhineng\PermissionTool\PermissionTool,
    ];
}
```

You can publish the lang files and config file with:

```
php artisan vendor:publish --provider="Lizhineng\PermissionTool\ToolServiceProvider"

```

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
-----

[](#usage)

Click on the "Access Control" menu item in your Nova app to see the tool provided by this package.

### Config

[](#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

[](#attach-to-users-detail-page)

Thanks to Nova, that's pretty easy to attach roles fields or permissions fields to users detail page.

```
// in app/Nova/User.php

// ...

public function fields()
{
    return [
        // ...

        MorphToMany::make('Roles', 'roles', \Lizhineng\PermissionTool\Role::class),

        MorphToMany::make('Permissions', 'permissions', \Lizhineng\PermissionTool\Permission::class),
    ];
}
```

And don't forget to use `Spatie\Permission\Traits\HasRoles` trait to your User model.

### Localization

[](#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

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Spatie](https://github.com/spatie)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~186 days

Total

3

Last Release

2487d ago

Major Versions

v1.1.0 → v2.0.02019-09-05

PHP version history (2 changes)v1.0.0PHP &gt;=7.1.3

v2.0.0PHP ^7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2339485?v=4)[Zhineng Li](/maintainers/lizhineng)[@lizhineng](https://github.com/lizhineng)

---

Top Contributors

[![lizhineng](https://avatars.githubusercontent.com/u/2339485?v=4)](https://github.com/lizhineng "lizhineng (4 commits)")

---

Tags

laravelnovapermissiontoollaraveltoolpermissionnova

### Embed Badge

![Health badge](/badges/lizhineng-nova-permission-tool/health.svg)

```
[![Health](https://phpackages.com/badges/lizhineng-nova-permission-tool/health.svg)](https://phpackages.com/packages/lizhineng-nova-permission-tool)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k3.5M118](/packages/bezhansalleh-filament-shield)[sereny/nova-permissions

Laravel Nova - Roles &amp; Permissions

87432.2k1](/packages/sereny-nova-permissions)[pktharindu/nova-permissions

Laravel Nova Grouped Permissions (ACL)

136409.8k](/packages/pktharindu-nova-permissions)[silvanite/novatoolpermissions

Laravel Nova Permissions (Roles and Permission based Access Control (ACL))

100262.7k2](/packages/silvanite-novatoolpermissions)[sametsahindogan/laravel-jwtredis

This package allows JWT-authenticated users to be stored and management in Redis with their roles, permissions, statuses and anything you want.

1222.0k](/packages/sametsahindogan-laravel-jwtredis)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
