PHPackages                             almas/laravel-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. almas/laravel-permission

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

almas/laravel-permission
========================

A dynamic role and permission system designed to reduce development time.

1.0.0(6mo ago)010MITBladePHP ^8.2

Since Oct 23Pushed 6mo agoCompare

[ Source](https://github.com/kh-almas/Laravel-Permission)[ Packagist](https://packagist.org/packages/almas/laravel-permission)[ Docs](https://github.com/almas/permission)[ RSS](/packages/almas-laravel-permission/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (12)Versions (2)Used By (0)

A dynamic role and permission system designed to reduce development time. Fully compatible with Laravel Livewire. Support for React and other stacks is in progress.
====================================================================================================================================================================

[](#a-dynamic-role-and-permission-system-designed-to-reduce-development-time-fully-compatible-with-laravel-livewire-support-for-react-and-other-stacks-is-in-progress)

[![Latest Version on Packagist](https://camo.githubusercontent.com/700160aa98d7eb55684f281dd1ce26d11db4672ce729f421d9575e268539f844/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6d61732f6c61726176656c2d7065726d697373696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/almas/laravel-permission)[![Total Downloads](https://camo.githubusercontent.com/aa5bd299a1e83963af572ac3c2d34230af874f63860fa3357ff10cbac6db47a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c6d61732f6c61726176656c2d7065726d697373696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/almas/laravel-permission)

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

[](#installation)

You can install the package via Composer:

```
composer require almas/laravel-permission
```

Set Super Admin Set the Super Admin email in your .env file:

```
SUPER_ADMIN_EMAIL=superadmin@gmail.com
```

- If not defined, the default is .
- A random password is automatically generated for the Super Admin.
- You can reset the password via the "Forgot Password" option

After installation, run the following Artisan command to set up everything:

```
php artisan permission
```

This command will:

- Run necessary database migrations
- Seed default roles and permissions automatically

No additional setup is required — you're ready to go!

### Publish Configuration File

[](#publish-configuration-file)

To publish the configuration file for this package, run the following command:

```
php artisan vendor:publish --tag=permission-config
```

---

Super Admin Features
--------------------

[](#super-admin-features)

- Only the Super Admin can create and delete permissions.
- For every new permission added to the system, the Super Admin is automatically granted that permission.

---

Route Registration
------------------

[](#route-registration)

Add the following line to your `routes/web.php` file:

```
use Illuminate\Support\Facades\Route;

Route::permission();
```

- By default, all routes will be protected using the auth middleware.
- This will automatically register all necessary permission management routes.

### Route Prefix Behavior

[](#route-prefix-behavior)

- When using Route::permission();, the base route will be:

```
{your-app-url}/permission
```

- You can customize the base route prefix by passing a parameter to the Route::permission() method:

```
Route::permission('custom-prefix');
```

- This will change the base route to:

```
{your-app-url}/custom-prefix
```

### Blade Helper to Get Base Permission URL

[](#blade-helper-to-get-base-permission-url)

```
@PermissionLink
```

---

Usage
-----

[](#usage)

- Get All Permissions (as array):

```
user_permission()
```

- Check a Single Permission: (eg. true/false):

```
user_permission('show-users')
```

- Blade Directives:

```
@user_permission('show-users')
    Show Users
@end_user_permission
```

---

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance68

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

201d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fadef30107def5a4489b019b2b669e570782e1230e636a925309918e03114325?d=identicon)[webgraph](/maintainers/webgraph)

---

Top Contributors

[![kh-almas](https://avatars.githubusercontent.com/u/82114173?v=4)](https://github.com/kh-almas "kh-almas (3 commits)")

---

Tags

laravelpermissionroleslaravel-permissionroles-and-permissionsdynamic rolesdynamic permissionsalmaslaravel role permissiondynamic role permission

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/almas-laravel-permission/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[codebot/entrust

This package provides a flexible way to add Role-based Permissions to Laravel

1596.6k](/packages/codebot-entrust)

PHPackages © 2026

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