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

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

elseoclub/laravel-permission-cache
==================================

Cache Permission handling for Laravel 8.0 and up

6.10.1(1y ago)06MITPHPPHP ^8.0

Since Nov 25Pushed 1y agoCompare

[ Source](https://github.com/ElSeoClub/laravel-permission-cache)[ Packagist](https://packagist.org/packages/elseoclub/laravel-permission-cache)[ Docs](https://github.com/ElSeoClub/laravel-permission-cache)[ GitHub Sponsors](https://github.com/spatie)[ RSS](/packages/elseoclub-laravel-permission-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (2)Used By (0)

[![Social Card of Laravel Permission](/art/socialcard.png)](/art/socialcard.png)

Associate users with permissions and roles
==========================================

[](#associate-users-with-permissions-and-roles)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8dac7f853825c1340b3a9d9a7905a75e01876fb19df42e145bf076a27d61f444/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f6c61726176656c2d7065726d697373696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-permission)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c4113fe25b2cf226227c01af9ebe9e13598f036e912385e741e3a4b8f75295ff/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7370617469652f6c61726176656c2d7065726d697373696f6e2f72756e2d74657374732d4c382e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473)](https://github.com/spatie/laravel-permission/actions?query=workflow%3ATests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ad5f5474cf3f24431e97d50a8db551720b656aaf774137db2ebcb4ac074fa16e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f6c61726176656c2d7065726d697373696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-permission)

Documentation, Installation, and Usage Instructions
---------------------------------------------------

[](#documentation-installation-and-usage-instructions)

See the [documentation](https://spatie.be/docs/laravel-permission/) for detailed installation and usage instructions.

What It Does
------------

[](#what-it-does)

This package allows you to manage user permissions and roles in a database.

Once installed you can do stuff like this:

```
// Adding permissions to a user
$user->givePermissionTo('edit articles');

// Adding permissions via a role
$user->assignRole('writer');

$role->givePermissionTo('edit articles');
```

Because all permissions will be registered on [Laravel's gate](https://laravel.com/docs/authorization), you can check if a user has a permission with Laravel's default `can` function:

```
$user->can('edit articles');
```

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/5b28028ab09fa239a01792616a22d242a2b681d3718c0efff875e16102148964/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6c61726176656c2d7065726d697373696f6e2e6a70673f743d31)](https://spatie.be/github-ad-click/laravel-permission)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

### Testing

[](#testing)

```
composer test
```

### Security

[](#security)

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

Postcardware
------------

[](#postcardware)

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.

We publish all received postcards [on our company website](https://spatie.be/en/opensource/postcards).

Credits
-------

[](#credits)

- [Chris Brown](https://github.com/drbyte)
- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)

This package is heavily based on [Jeffrey Way](https://twitter.com/jeffrey_way)'s awesome [Laracasts](https://laracasts.com) lessons on [permissions and roles](https://laracasts.com/series/whats-new-in-laravel-5-1/episodes/16). His original code can be found [in this repo on GitHub](https://github.com/laracasts/laravel-5-roles-and-permissions-demo).

Special thanks to [Alex Vanderbist](https://github.com/AlexVanderbist) who greatly helped with `v2`, and to [Chris Brown](https://github.com/drbyte) for his longtime support helping us maintain the package.

And a special thanks to [Caneco](https://twitter.com/caneco) for the logo ✨

Alternatives
------------

[](#alternatives)

- [Povilas Korop](https://twitter.com/@povilaskorop) did an excellent job listing the alternatives [in an article on Laravel News](https://laravel-news.com/two-best-roles-permissions-packages). In that same article, he compares laravel-permission to [Joseph Silber](https://github.com/JosephSilber)'s Bouncer, which in our book is also an excellent package.
- [santigarcor/laratrust](https://github.com/santigarcor/laratrust) implements team support
- [ultraware/roles](https://github.com/ultraware/roles) (archived) takes a slightly different approach to its features.
- [zizaco/entrust](https://github.com/zizaco/entrust) offers some wildcard pattern matching

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.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

Unknown

Total

1

Last Release

533d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/29510c3f37e000b922010fb5da3ba26eb8d568d27da0c9e910cbbb612c9e2aba?d=identicon)[ElSeoClub](/maintainers/ElSeoClub)

---

Top Contributors

[![drbyte](https://avatars.githubusercontent.com/u/404472?v=4)](https://github.com/drbyte "drbyte (898 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (291 commits)")[![erikn69](https://avatars.githubusercontent.com/u/4933954?v=4)](https://github.com/erikn69 "erikn69 (85 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (40 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (14 commits)")[![musapinar](https://avatars.githubusercontent.com/u/7329873?v=4)](https://github.com/musapinar "musapinar (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![tomlankhorst](https://avatars.githubusercontent.com/u/675432?v=4)](https://github.com/tomlankhorst "tomlankhorst (11 commits)")[![angeljqv](https://avatars.githubusercontent.com/u/79208641?v=4)](https://github.com/angeljqv "angeljqv (10 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (9 commits)")[![sergejostir](https://avatars.githubusercontent.com/u/21297285?v=4)](https://github.com/sergejostir "sergejostir (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![springleng](https://avatars.githubusercontent.com/u/1900972?v=4)](https://github.com/springleng "springleng (6 commits)")[![juvpengele](https://avatars.githubusercontent.com/u/30692796?v=4)](https://github.com/juvpengele "juvpengele (5 commits)")[![artissant](https://avatars.githubusercontent.com/u/2280426?v=4)](https://github.com/artissant "artissant (5 commits)")[![lowerends](https://avatars.githubusercontent.com/u/6588791?v=4)](https://github.com/lowerends "lowerends (4 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (4 commits)")[![barryatswisnl](https://avatars.githubusercontent.com/u/18284224?v=4)](https://github.com/barryatswisnl "barryatswisnl (4 commits)")[![lloricode](https://avatars.githubusercontent.com/u/8251344?v=4)](https://github.com/lloricode "lloricode (4 commits)")[![matthewgoslett](https://avatars.githubusercontent.com/u/1571743?v=4)](https://github.com/matthewgoslett "matthewgoslett (3 commits)")

---

Tags

spatielaravelsecurityaclpermissionrolespermissionsrbac

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

### Embed Badge

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

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

###  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)[wnikk/laravel-access-rules

Simple system of ACR (access control rules) for Laravel, with roles, groups, unlimited inheritance and possibility of multiplayer use.

103.6k1](/packages/wnikk-laravel-access-rules)[erag/laravel-role-permission

A simple and easy-to-install role and permission management package for Laravel, supporting versions 10.x and 11.x

404.2k](/packages/erag-laravel-role-permission)

PHPackages © 2026

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