PHPackages                             kiritokatklian/nova-permission - 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. kiritokatklian/nova-permission

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

kiritokatklian/nova-permission
==============================

A Laravel Nova tool for Spatie's Permission library.

5.2.0(3mo ago)791.1M—1.8%20[1 issues](https://github.com/kiritokatklian/nova-permission/issues)2MITPHPPHP &gt;=8.1

Since Aug 23Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/kiritokatklian/nova-permission)[ Packagist](https://packagist.org/packages/kiritokatklian/nova-permission)[ RSS](/packages/kiritokatklian-nova-permission/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (75)Used By (2)

A Laravel Nova tool for Spatie's laravel-permission library
===========================================================

[](#a-laravel-nova-tool-for-spaties-laravel-permission-library)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b7262833d17185e9852f6d4222ed56abff592962c940cf029574b33c375dbf19/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b697269746f6b61746b6c69616e2f6e6f76612d7065726d697373696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kiritokatklian/nova-permission)[![Total Downloads](https://camo.githubusercontent.com/93189ee3da45e809d681785b79c91210a934596f016210e6175aa60539a2ecbb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b697269746f6b61746b6c69616e2f6e6f76612d7065726d697373696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kiritokatklian/nova-permission)

[![screenshot 1](https://raw.githubusercontent.com/kiritokatklian/nova-permission/master/docs/user-resource.png)](https://raw.githubusercontent.com/kiritokatklian/nova-permission/master/docs/user-resource.png)

Note
----

[](#note)

Credits to [vyuldashev](https://github.com/vyuldashev). Since the original package hasn't been updated for a while now and there's no sign from vyuldashev, I created this fork with all the latest changes. I use this mainly in my projects, but feel welcome to use it as well. PRs are also welcome.

Version Compatibility
---------------------

[](#version-compatibility)

With the release of Nova 4.0, there are now two separate versions of Nova Permissions. Unfortuantly due to the nature of the update, the new one isn't backwards copmatible. So please choose your version accordingly.

Laravel NovaNova Permission3.03.0 - 3.2.24.04.05.05.0 - 7.0Installation
------------

[](#installation)

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

```
composer require kiritokatklian/nova-permission
```

Go through the [Installation](https://github.com/spatie/laravel-permission#installation) section in order to setup [laravel-permission](https://packagist.org/packages/spatie/laravel-permission).

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 [
        // ...
        \Vyuldashev\NovaPermission\NovaPermissionTool::make(),
    ];
}
```

Next, add middleware to `config/nova.php`

```
// in config/nova.php
'middleware' => [
    // ...
    \Vyuldashev\NovaPermission\ForgetCachedPermissions::class,
],
```

Finally, add `MorphToMany` fields to you `app/Nova/User` resource:

```
// ...
use Laravel\Nova\Fields\MorphToMany;

public function fields(Request $request)
{
    return [
        // ...
        MorphToMany::make('Roles', 'roles', \Vyuldashev\NovaPermission\Role::class),
        MorphToMany::make('Permissions', 'permissions', \Vyuldashev\NovaPermission\Permission::class),
    ];
}
```

Or if you want to attach multiple permissions at once, use `RoleBooleanGroup` and `PermissionBooleanGroup` fields (requires at least Nova 2.6.0):

```
// ...
use Vyuldashev\NovaPermission\PermissionBooleanGroup;
use Vyuldashev\NovaPermission\RoleBooleanGroup;

public function fields(Request $request)
{
    return [
        // ...
        RoleBooleanGroup::make('Roles'),
        PermissionBooleanGroup::make('Permissions'),
    ];
}
```

If your `User` could have a single role at any given time, you can use `RoleSelect` field. This field will render a standard select where you can pick a single role from.

```
// ...
use Vyuldashev\NovaPermission\PermissionBooleanGroup;
use Vyuldashev\NovaPermission\RoleSelect;

public function fields(Request $request)
{
    return [
        // ...
        RoleSelect::make('Role', 'roles'),
    ];
}
```

Customization
-------------

[](#customization)

If you want to use custom resource classes you can define them when you register a tool:

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

// ...

public function tools()
{
    return [
        // ...
        \Vyuldashev\NovaPermission\NovaPermissionTool::make()
            ->roleResource(CustomRole::class)
            ->permissionResource(CustomPermission::class),
    ];
}
```

If you want to show your roles and policies with a custom label, you can set `$labelAttribute` when instantiating your fields:

```
// ...
use Vyuldashev\NovaPermission\PermissionBooleanGroup;
use Vyuldashev\NovaPermission\RoleSelect;

public function fields(Request $request)
{
    return [
        // ...
        RoleBooleanGroup::make('Roles', 'roles', null, 'description'),
        PermissionBooleanGroup::make('Permissions', 'permissions', null, 'description'),
        RoleSelect::make('Role', 'roles', null, 'description'),
    ];
}
```

Define Policies
---------------

[](#define-policies)

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

// ...

public function tools()
{
    return [
        // ...
        \Vyuldashev\NovaPermission\NovaPermissionTool::make()
            ->rolePolicy(RolePolicy::class)
            ->permissionPolicy(PermissionPolicy::class),
    ];
}
```

Usage
-----

[](#usage)

A new menu item called "Permissions &amp; Roles" will appear in your Nova app after installing this package.

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance81

Actively maintained with recent releases

Popularity54

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~38 days

Recently: every ~100 days

Total

72

Last Release

96d ago

Major Versions

v1.9.0 → v2.0.02019-09-04

v1.10.0 → v2.1.02019-09-04

v2.11.1 → v3.0.02021-05-17

v3.2.2 → v4.0.02022-04-08

4.0.10 → 5.0.02024-12-19

PHP version history (8 changes)v1.0.0PHP ^7.1.

v1.3.1PHP ^7.1

v2.0.0PHP ^7.2

v2.10.0PHP ^7.2|^8.0

v3.0.0PHP ^7.4|^8.0

v3.1.0PHP ^7.4|^8.0|^8.1

5.1.0PHP ^8.1

5.2.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b39f6e928a36e5e42a38ee97960f6b1d34b18b990d314d81b784d8276d81692?d=identicon)[kiritokatklian](/maintainers/kiritokatklian)

---

Top Contributors

[![vyuldashev](https://avatars.githubusercontent.com/u/1809081?v=4)](https://github.com/vyuldashev "vyuldashev (89 commits)")[![kiritokatklian](https://avatars.githubusercontent.com/u/6556281?v=4)](https://github.com/kiritokatklian "kiritokatklian (36 commits)")[![nalingia](https://avatars.githubusercontent.com/u/5793125?v=4)](https://github.com/nalingia "nalingia (6 commits)")[![Reflow1319](https://avatars.githubusercontent.com/u/6665500?v=4)](https://github.com/Reflow1319 "Reflow1319 (5 commits)")[![Kussie](https://avatars.githubusercontent.com/u/4960791?v=4)](https://github.com/Kussie "Kussie (5 commits)")[![gnanakeethan](https://avatars.githubusercontent.com/u/2353181?v=4)](https://github.com/gnanakeethan "gnanakeethan (4 commits)")[![SiebeVE](https://avatars.githubusercontent.com/u/14889418?v=4)](https://github.com/SiebeVE "SiebeVE (4 commits)")[![mxm1070](https://avatars.githubusercontent.com/u/11588575?v=4)](https://github.com/mxm1070 "mxm1070 (3 commits)")[![potsky](https://avatars.githubusercontent.com/u/408237?v=4)](https://github.com/potsky "potsky (3 commits)")[![shalawani](https://avatars.githubusercontent.com/u/7045417?v=4)](https://github.com/shalawani "shalawani (3 commits)")[![charlielangridge](https://avatars.githubusercontent.com/u/8578083?v=4)](https://github.com/charlielangridge "charlielangridge (3 commits)")[![johnpaulmedina](https://avatars.githubusercontent.com/u/1139439?v=4)](https://github.com/johnpaulmedina "johnpaulmedina (2 commits)")[![IGedeon](https://avatars.githubusercontent.com/u/694313?v=4)](https://github.com/IGedeon "IGedeon (2 commits)")[![letrams](https://avatars.githubusercontent.com/u/6623497?v=4)](https://github.com/letrams "letrams (2 commits)")[![erhansogut](https://avatars.githubusercontent.com/u/1370493?v=4)](https://github.com/erhansogut "erhansogut (2 commits)")[![drbyte](https://avatars.githubusercontent.com/u/404472?v=4)](https://github.com/drbyte "drbyte (2 commits)")[![stepanenko3](https://avatars.githubusercontent.com/u/31134245?v=4)](https://github.com/stepanenko3 "stepanenko3 (2 commits)")[![marcorivm](https://avatars.githubusercontent.com/u/1222598?v=4)](https://github.com/marcorivm "marcorivm (1 commits)")[![ashgibson](https://avatars.githubusercontent.com/u/1744544?v=4)](https://github.com/ashgibson "ashgibson (1 commits)")[![dividy](https://avatars.githubusercontent.com/u/19650505?v=4)](https://github.com/dividy "dividy (1 commits)")

---

Tags

laravel-novalaravel-nova-3laravel-nova-4novapermissionsspatie-laravelspatie-laravel-permissionlaravelnovaspatie-permission

### Embed Badge

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

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

###  Alternatives

[vyuldashev/nova-permission

A Laravel Nova tool for Spatie's Permission library.

4332.5M3](/packages/vyuldashev-nova-permission)[sereny/nova-permissions

Laravel Nova - Roles &amp; Permissions

86388.6k1](/packages/sereny-nova-permissions)[itsmejoshua/novaspatiepermissions

Laravel Nova tool for managing spaties roles/permissions in laravel's nova package.

30262.5k](/packages/itsmejoshua-novaspatiepermissions)

PHPackages © 2026

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