PHPackages                             shah-newaz/permissible-ng - 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. shah-newaz/permissible-ng

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

shah-newaz/permissible-ng
=========================

Role Permission system for Laravel 11+

v3.0.1(3mo ago)0176MITPHPPHP ^8.2

Since Oct 11Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/intellehub/permissible-ng)[ Packagist](https://packagist.org/packages/shah-newaz/permissible-ng)[ RSS](/packages/shah-newaz-permissible-ng/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (4)Versions (50)Used By (0)

Permissible NG
==============

[](#permissible-ng)

A flexible and powerful Laravel package for managing roles and permissions with hierarchical support.

Features
--------

[](#features)

- Role-based access control (RBAC)
- Hierarchical roles with weight-based inheritance
- Permission management
- Route middleware for roles and permissions
- Caching support for optimal performance
- Soft delete support

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

[](#installation)

```
composer require shah-newaz/permissible-ng
```

```
php artisan vendor:publish --provider="Shahnewaz\PermissibleNg\Providers\PermissibleServiceProvider"
```

Run the migrations:

```
php artisan migrate
```

Usage
-----

[](#usage)

### Setup User Model

[](#setup-user-model)

Add the `Permissible` trait to your User model:

```
use Shahnewaz\PermissibleNg\Traits\Permissible;

class User extends Authenticatable
{
    use Permissible;

    // ... rest of your User model
}
```

Note: This can be done using the `permissible:setup` command automatically.

### Managing Roles and Permissions

[](#managing-roles-and-permissions)

```
// Create a role
$role = Role::create([
    'name' => 'Admin',
    'code' => 'admin',
    'weight' => 1
]);

// Create a permission
$permission = Permission::createPermission('users.create');

// Assign permission to role
$role->permissions()->attach($permission);

// Assign role to user
$user->roles()->attach($role);
```

### Checking Permissions

[](#checking-permissions)

```
// Check single permission
$user->hasPermission('users.create');

// Check multiple permissions (requires all)
$user->hasPermissions(['users.create', 'users.delete']);

// Check permission type
$user->hasPermissionType('users');
```

### Route Protection

[](#route-protection)

Use the elegant route middleware syntax:

```
// Protect routes with roles
Route::get('/admin/dashboard', [DashboardController::class, 'index'])
    ->roles(['admin', 'super-admin']);

// Protect routes with permissions
Route::get('/users', [UserController::class, 'index'])
    ->permissions(['users.view']);

// Combine both
Route::get('/users/create', [UserController::class, 'create'])
    ->roles(['admin'])
    ->permissions(['users.create']);
```

### Route Group Protection

[](#route-group-protection)

```
Route::group(['middleware' => ['roles:su,admin']], function () {
    Route::get('/admin/dashboard', [DashboardController::class, 'index']);
});
```

### Permission Wildcards

[](#permission-wildcards)

Use wildcards for broader permission control:

```
// Grant all user permissions
Permission::createPermission('users.*');

// Check if user has any user permission
$user->hasPermissionType('users');
```

Configuration
-------------

[](#configuration)

The package configuration can be modified in `config/permissible.php`:

```
return [
    'enable_routes' => true,
    'enable_user_management_routes' => true,
    'first_last_name_migration' => true,
    'default_fallback_route' => 'backend.dashboard',
];
```

License
-------

[](#license)

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

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance80

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 76.5% 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 ~40 days

Recently: every ~90 days

Total

49

Last Release

106d ago

Major Versions

v1.0.3 → v2.0.02025-01-04

v2.4.2 → v3.0.02025-03-02

PHP version history (3 changes)v1.0.0PHP ^7.3

v1.0.3PHP &gt;=7.3

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/fc4071c671a437425cb51aff82af32b4b28c7510c9a593da427026a5f8a07023?d=identicon)[shah-newaz](/maintainers/shah-newaz)

---

Top Contributors

[![shah-newaz](https://avatars.githubusercontent.com/u/11506530?v=4)](https://github.com/shah-newaz "shah-newaz (39 commits)")[![shahnewazrifat](https://avatars.githubusercontent.com/u/41450438?v=4)](https://github.com/shahnewazrifat "shahnewazrifat (12 commits)")

---

Tags

laravelaclpermissionbackendadminrolerole permission

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shah-newaz-permissible-ng/health.svg)

```
[![Health](https://phpackages.com/badges/shah-newaz-permissible-ng/health.svg)](https://phpackages.com/packages/shah-newaz-permissible-ng)
```

###  Alternatives

[efficiently/authority-controller

AuthorityController is an PHP authorization library for Laravel 5 which restricts what resources a given user is allowed to access.

15533.2k](/packages/efficiently-authority-controller)

PHPackages © 2026

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