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

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

klc/permission
==============

permission package for laravel

v1.2.3(6mo ago)029MITPHPPHP ^8

Since Sep 14Pushed 6mo ago1 watchersCompare

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

READMEChangelog (7)Dependencies (7)Versions (8)Used By (0)

How To Install
--------------

[](#how-to-install)

`composer require klc/permission`

`php artisan migrate`

`KLC\PermissionTrait` add to user model

How To Use
----------

[](#how-to-use)

### example :

[](#example-)

roles table :

idnameslug1Adminadmin2Clientclientuser\_role table :

user\_idrole\_id1112idnameslug1Foofoo2Barbar3Bazbaz4Otherotherrole\_permission table:

role\_idpermission\_id111224permission check:```
        $user = User::where('id', 1)->first();
        dump($user->hasPermission('foo'));
        dump($user->hasPermission('bar'));
        dump($user->hasPermission('baz'));
        dump($user->hasPermission('other'));
```

output:

```
true
true
false
true
```

role check:

```
        $user = User::where('id', 1)->first();
        dump($user->hasRole('admin'));
        dump($user->hasRole('client'));
        dump($user->hasRole('foo'));
```

output:

```
true
true
false
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance67

Regular maintenance activity

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Total

7

Last Release

192d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)

PHPackages © 2026

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