PHPackages                             nick-scalewest/php-casbin - 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. nick-scalewest/php-casbin

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

nick-scalewest/php-casbin
=========================

a powerful and efficient open-source access control library for php projects.

1.0.1(2y ago)132012Apache-2.0PHPPHP &gt;=7.1.0

Since Mar 28Pushed 2y agoCompare

[ Source](https://github.com/nick-scalewest/php-casbin)[ Packagist](https://packagist.org/packages/nick-scalewest/php-casbin)[ Fund](https://opencollective.com/casbin)[ RSS](/packages/nick-scalewest-php-casbin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (2)

PHP-Casbin
==========

[](#php-casbin)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/05c606b21511162be1364d81999e30335553a28e44742d0967cc643a362acd84/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7068702d63617362696e2f7068702d63617362696e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/php-casbin/php-casbin/?branch=master)[![Default](https://github.com/php-casbin/php-casbin/workflows/build/badge.svg?branch=master)](https://github.com/php-casbin/php-casbin/actions)[![Coverage Status](https://camo.githubusercontent.com/7295ebc4ac51c8c3d24d1f2490c3ea5b7de93eee4e18e4fef4b57aa6a7014afa/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7068702d63617362696e2f7068702d63617362696e2f62616467652e737667)](https://coveralls.io/github/php-casbin/php-casbin)[![Latest Stable Version](https://camo.githubusercontent.com/514e5d35229c774c2939cd92fe6e69f17de521b56f714732db206a28fea43cf4/68747470733a2f2f706f7365722e707567782e6f72672f63617362696e2f63617362696e2f762f737461626c65)](https://packagist.org/packages/casbin/casbin)[![Total Downloads](https://camo.githubusercontent.com/acacf1814cbe1263231add5524bd8b89efae9e1e38716c0b7e1b6a739ff04a7b/68747470733a2f2f706f7365722e707567782e6f72672f63617362696e2f63617362696e2f646f776e6c6f616473)](https://packagist.org/packages/casbin/casbin)[![License](https://camo.githubusercontent.com/ac3b335b2a37051b1f8df44a2f4027628f18246f11ba58d95108274d524575df/68747470733a2f2f706f7365722e707567782e6f72672f63617362696e2f63617362696e2f6c6963656e7365)](https://packagist.org/packages/casbin/casbin)[![Gitter](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/casbin/lobby)

[Documentation](https://casbin.org/docs/overview) | [Tutorials](https://github.com/php-casbin/casbin-tutorials) | [Extensions](https://github.com/php-casbin)

**Breaking News**: [Laravel-authz](https://github.com/php-casbin/laravel-authz) is now available, an authorization library for the Laravel framework.

**PHP-Casbin** is a powerful and efficient open-source access control library for PHP projects. It provides support for enforcing authorization based on various [access control models](https://en.wikipedia.org/wiki/Computer_security_model).

All the languages supported by Casbin:
--------------------------------------

[](#all-the-languages-supported-by-casbin)

[![golang](https://camo.githubusercontent.com/1adf5bcdb68ed9b6f2825cf28c79c9ec0f3d90b840c6fd25e9ddad28343db97a/68747470733a2f2f63617362696e2e6f72672f696d672f6c616e67732f676f6c616e672e706e67)](https://github.com/casbin/casbin)[![java](https://camo.githubusercontent.com/39c5fd694bc6f8fb9660ddc066cf31f68fd483301d801428facd3d0bd2cb4fc6/68747470733a2f2f63617362696e2e6f72672f696d672f6c616e67732f6a6176612e706e67)](https://github.com/casbin/jcasbin)[![nodejs](https://camo.githubusercontent.com/15202525247e0a3e2c4af865c411f553b9fc951038376562cd077f0334b8f35c/68747470733a2f2f63617362696e2e6f72672f696d672f6c616e67732f6e6f64656a732e706e67)](https://github.com/casbin/node-casbin)[![php](https://camo.githubusercontent.com/b3e0aa8a19dd1f2a1a7845ab80ca33c39ad245f4e34b5cdecc45cc3fff3f67f4/68747470733a2f2f63617362696e2e6f72672f696d672f6c616e67732f7068702e706e67)](https://github.com/php-casbin/php-casbin)[Casbin](https://github.com/casbin/casbin)[jCasbin](https://github.com/casbin/jcasbin)[node-Casbin](https://github.com/casbin/node-casbin)[PHP-Casbin](https://github.com/php-casbin/php-casbin)production-readyproduction-readyproduction-readyproduction-ready[![python](https://camo.githubusercontent.com/9fd3467dae6f413f490ab8ac810e413876c46e29e20c61bec54d5c74a1ff14c5/68747470733a2f2f63617362696e2e6f72672f696d672f6c616e67732f707974686f6e2e706e67)](https://github.com/casbin/pycasbin)[![dotnet](https://camo.githubusercontent.com/e0cfc962451369460cb4b0cbe480a69c6a149dee976e115ca51d490bf4a02cdb/68747470733a2f2f63617362696e2e6f72672f696d672f6c616e67732f646f746e65742e706e67)](https://github.com/casbin/Casbin.NET)[![c++](https://camo.githubusercontent.com/0d2362a315bc183aa64cd67bd5910afcb791aec0d7274909310fa0499bd9b9ad/68747470733a2f2f63617362696e2e6f72672f696d672f6c616e67732f6370702e706e67)](https://github.com/casbin/casbin-cpp)[![rust](https://camo.githubusercontent.com/db935244b40cb3f6b37f89e25b8fd7ffb04951404f5d863bc76d8e1a52e9eabe/68747470733a2f2f63617362696e2e6f72672f696d672f6c616e67732f727573742e706e67)](https://github.com/casbin/casbin-rs)[PyCasbin](https://github.com/casbin/pycasbin)[Casbin.NET](https://github.com/casbin/Casbin.NET)[Casbin-CPP](https://github.com/casbin/casbin-cpp)[Casbin-RS](https://github.com/casbin/casbin-rs)production-readyproduction-readybeta-testproduction-readyInstallation
------------

[](#installation)

Require this package in the `composer.json` of your project. This will download the package:

```
composer require casbin/casbin

```

Get started
-----------

[](#get-started)

1. New a Casbin enforcer with a model file and a policy file:

```
require_once './vendor/autoload.php';

use Casbin\Enforcer;

$e = new Enforcer("path/to/model.conf", "path/to/policy.csv");
```

2. Add an enforcement hook into your code right before the access happens:

```
$sub = "alice"; // the user that wants to access a resource.
$obj = "data1"; // the resource that is going to be accessed.
$act = "read"; // the operation that the user performs on the resource.

if ($e->enforce($sub, $obj, $act) === true) {
    // permit alice to read data1
} else {
    // deny the request, show an error
}
```

Table of contents
-----------------

[](#table-of-contents)

- [Supported models](#supported-models)
- [How it works?](#how-it-works)
- [Features](#features)
- [Documentation](#documentation)
- [Online editor](#online-editor)
- [Tutorials](#tutorials)
- [Policy management](#policy-management)
- [Policy persistence](#policy-persistence)
- [Role manager](#role-manager)
- [Examples](#examples)
- [Middlewares](#middlewares)
- [Our adopters](#our-adopters)

Supported models
----------------

[](#supported-models)

1. [**ACL (Access Control List)**](https://en.wikipedia.org/wiki/Access_control_list)
2. **ACL with [superuser](https://en.wikipedia.org/wiki/Superuser)**
3. **ACL without users**: especially useful for systems that don't have authentication or user log-ins.
4. **ACL without resources**: some scenarios may target for a type of resources instead of an individual resource by using permissions like `write-article`, `read-log`. It doesn't control the access to a specific article or log.
5. **[RBAC (Role-Based Access Control)](https://en.wikipedia.org/wiki/Role-based_access_control)**
6. **RBAC with resource roles**: both users and resources can have roles (or groups) at the same time.
7. **RBAC with domains/tenants**: users can have different role sets for different domains/tenants.
8. **[ABAC (Attribute-Based Access Control)](https://en.wikipedia.org/wiki/Attribute-Based_Access_Control)**: syntax sugar like `resource.Owner` can be used to get the attribute for a resource.
9. **[RESTful](https://en.wikipedia.org/wiki/Representational_state_transfer)**: supports paths like `/res/*`, `/res/:id` and HTTP methods like `GET`, `POST`, `PUT`, `DELETE`.
10. **Deny-override**: both allow and deny authorizations are supported, deny overrides the allow.
11. **Priority**: the policy rules can be prioritized like firewall rules.

How it works?
-------------

[](#how-it-works)

In php-casbin, an access control model is abstracted into a CONF file based on the **PERM metamodel (Policy, Effect, Request, Matchers)**. So switching or upgrading the authorization mechanism for a project is just as simple as modifying a configuration. You can customize your own access control model by combining the available models. For example, you can get RBAC roles and ABAC attributes together inside one model and share one set of policy rules.

The most basic and simplest model in php-casbin is ACL. ACL's model CONF is:

```
# Request definition
[request_definition]
r = sub, obj, act

# Policy definition
[policy_definition]
p = sub, obj, act

# Policy effect
[policy_effect]
e = some(where (p.eft == allow))

# Matchers
[matchers]
m = r.sub == p.sub && r.obj == p.obj && r.act == p.act
```

An example policy for ACL model is like:

```
p, alice, data1, read
p, bob, data2, write

```

It means:

- alice can read data1
- bob can write data2

Features
--------

[](#features)

What php-casbin does:

1. enforce the policy in the classic `{subject, object, action}` form or a customized form as you defined, both allow and deny authorizations are supported.
2. handle the storage of the access control model and its policy.
3. manage the role-user mappings and role-role mappings (aka role hierarchy in RBAC).
4. support built-in superuser like `root` or `administrator`. A superuser can do anything without explict permissions.
5. multiple built-in operators to support the rule matching. For example, `keyMatch` can map a resource key `/foo/bar` to the pattern `/foo*`.

What php-casbin does NOT do:

1. authentication (aka verify `username` and `password` when a user logs in)
2. manage the list of users or roles. I believe it's more convenient for the project itself to manage these entities. Users usually have their passwords, and php-casbin is not designed as a password container. However, php-casbin stores the user-role mapping for the RBAC scenario.

Documentation
-------------

[](#documentation)

Online editor
-------------

[](#online-editor)

You can also use the online editor () to write your php-casbin model and policy in your web browser. It provides functionality such as `syntax highlighting` and `code completion`, just like an IDE for a programming language.

Tutorials
---------

[](#tutorials)

Policy management
-----------------

[](#policy-management)

php-casbin provides two sets of APIs to manage permissions:

- [Management API](https://casbin.org/docs/en/management-api): the primitive API that provides full support for php-casbin policy management.
- [RBAC API](https://casbin.org/docs/en/rbac-api): a more friendly API for RBAC. This API is a subset of Management API. The RBAC users could use this API to simplify the code.

[![model editor](https://camo.githubusercontent.com/7ff76257a6df015b000ac15d4a5e7079504de9c09cd57411f25ab7ac7956d0d2/68747470733a2f2f68736c756f797a2e6769746875622e696f2f63617362696e2f75695f6d6f64656c5f656469746f722e706e67)](https://camo.githubusercontent.com/7ff76257a6df015b000ac15d4a5e7079504de9c09cd57411f25ab7ac7956d0d2/68747470733a2f2f68736c756f797a2e6769746875622e696f2f63617362696e2f75695f6d6f64656c5f656469746f722e706e67)

[![policy editor](https://camo.githubusercontent.com/44a14c514322f377d198a15570b2f6791ea1098f422a6afeee1e49b339db4361/68747470733a2f2f68736c756f797a2e6769746875622e696f2f63617362696e2f75695f706f6c6963795f656469746f722e706e67)](https://camo.githubusercontent.com/44a14c514322f377d198a15570b2f6791ea1098f422a6afeee1e49b339db4361/68747470733a2f2f68736c756f797a2e6769746875622e696f2f63617362696e2f75695f706f6c6963795f656469746f722e706e67)

Policy persistence
------------------

[](#policy-persistence)

Role manager
------------

[](#role-manager)

Examples
--------

[](#examples)

ModelModel filePolicy fileACL[basic\_model.conf](https://github.com/php-casbin/php-casbin/blob/master/examples/basic_model.conf)[basic\_policy.csv](https://github.com/php-casbin/php-casbin/blob/master/examples/basic_policy.csv)ACL with superuser[basic\_model\_with\_root.conf](https://github.com/php-casbin/php-casbin/blob/master/examples/basic_with_root_model.conf)[basic\_policy.csv](https://github.com/php-casbin/php-casbin/blob/master/examples/basic_policy.csv)ACL without users[basic\_model\_without\_users.conf](https://github.com/php-casbin/php-casbin/blob/master/examples/basic_without_users_model.conf)[basic\_policy\_without\_users.csv](https://github.com/php-casbin/php-casbin/blob/master/examples/basic_without_users_policy.csv)ACL without resources[basic\_model\_without\_resources.conf](https://github.com/php-casbin/php-casbin/blob/master/examples/basic_without_resources_model.conf)[basic\_policy\_without\_resources.csv](https://github.com/php-casbin/php-casbin/blob/master/examples/basic_without_resources_policy.csv)RBAC[rbac\_model.conf](https://github.com/php-casbin/php-casbin/blob/master/examples/rbac_model.conf)[rbac\_policy.csv](https://github.com/php-casbin/php-casbin/blob/master/examples/rbac_policy.csv)RBAC with resource roles[rbac\_model\_with\_resource\_roles.conf](https://github.com/php-casbin/php-casbin/blob/master/examples/rbac_with_resource_roles_model.conf)[rbac\_policy\_with\_resource\_roles.csv](https://github.com/php-casbin/php-casbin/blob/master/examples/rbac_with_resource_roles_policy.csv)RBAC with domains/tenants[rbac\_model\_with\_domains.conf](https://github.com/php-casbin/php-casbin/blob/master/examples/rbac_with_domains_model.conf)[rbac\_policy\_with\_domains.csv](https://github.com/php-casbin/php-casbin/blob/master/examples/rbac_with_domains_policy.csv)ABAC[abac\_model.conf](https://github.com/php-casbin/php-casbin/blob/master/examples/abac_model.conf)N/ARESTful[keymatch\_model.conf](https://github.com/php-casbin/php-casbin/blob/master/examples/keymatch_model.conf)[keymatch\_policy.csv](https://github.com/php-casbin/php-casbin/blob/master/examples/keymatch_policy.csv)Deny-override[rbac\_model\_with\_deny.conf](https://github.com/php-casbin/php-casbin/blob/master/examples/rbac_with_deny_model.conf)[rbac\_policy\_with\_deny.csv](https://github.com/php-casbin/php-casbin/blob/master/examples/rbac_with_deny_policy.csv)Priority[priority\_model.conf](https://github.com/php-casbin/php-casbin/blob/master/examples/priority_model.conf)[priority\_policy.csv](https://github.com/php-casbin/php-casbin/blob/master/examples/priority_policy.csv)Middlewares
-----------

[](#middlewares)

Authz middlewares for web frameworks:

Our adopters
------------

[](#our-adopters)

Contributors
------------

[](#contributors)

This project exists thanks to all the people who contribute. [![](https://camo.githubusercontent.com/5827db18e056f2b0cab515fcc6691c783cbee02765f32404db67410e61e69ba7/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f7068702d63617362696e2f636f6e7472696275746f72732e7376673f77696474683d38393026627574746f6e3d66616c7365)](https://github.com/php-casbin/php-casbin/graphs/contributors)

Backers
-------

[](#backers)

Thank you to all our backers! 🙏 \[[Become a backer](https://opencollective.com/casbin#backer)\]

[![](https://camo.githubusercontent.com/9a63459e276b2ad3916b29cb4b04fae56d9aa837568f81cd18aff48c629b130a/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f63617362696e2f6261636b6572732e7376673f77696474683d383930)](https://opencollective.com/casbin#backers)

Sponsors
--------

[](#sponsors)

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. \[[Become a sponsor](https://opencollective.com/casbin#sponsor)\]

[![](https://camo.githubusercontent.com/450a966c0128d8c4e15da79b08de75ad9125011d98f0ec95bdff6156ad58eb82/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f63617362696e2f73706f6e736f722f302f6176617461722e737667)](https://opencollective.com/casbin/sponsor/0/website)[![](https://camo.githubusercontent.com/c8f6429a416c530488dbb1a134771abb6411e80a8322122f5c9a597f9581e96b/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f63617362696e2f73706f6e736f722f312f6176617461722e737667)](https://opencollective.com/casbin/sponsor/1/website)[![](https://camo.githubusercontent.com/fe4230bb693d2ba9c257c76b33b5c6d1b9a9a1c3f72f0cfa77cd637c06abc309/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f63617362696e2f73706f6e736f722f322f6176617461722e737667)](https://opencollective.com/casbin/sponsor/2/website)[![](https://camo.githubusercontent.com/e42e886e4524b2d3709fa3e6d0208457e53642e02fad28f08fdc976013017436/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f63617362696e2f73706f6e736f722f332f6176617461722e737667)](https://opencollective.com/casbin/sponsor/3/website)[![](https://camo.githubusercontent.com/ea0472a73303bae24cff55c34e1d343db773b7f1b46b18881f435d1cf1990d6e/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f63617362696e2f73706f6e736f722f342f6176617461722e737667)](https://opencollective.com/casbin/sponsor/4/website)[![](https://camo.githubusercontent.com/03feb755773779401321d670d6a080d0403461d34f3de3f53ed22c601c3931c3/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f63617362696e2f73706f6e736f722f352f6176617461722e737667)](https://opencollective.com/casbin/sponsor/5/website)[![](https://camo.githubusercontent.com/cd2f82da1bb1ce18da9df87a1a088c0e92fb3bb7525689a20d3cca99056f77ef/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f63617362696e2f73706f6e736f722f362f6176617461722e737667)](https://opencollective.com/casbin/sponsor/6/website)[![](https://camo.githubusercontent.com/2224aebd1899c8ea14d42a324cebf6c75ebd3a0bc5b028567d1fb3b579542cae/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f63617362696e2f73706f6e736f722f372f6176617461722e737667)](https://opencollective.com/casbin/sponsor/7/website)[![](https://camo.githubusercontent.com/3672112ab098aa430befbc3e7d19fafe3e193e10daa6c63bae6a89ca2699e938/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f63617362696e2f73706f6e736f722f382f6176617461722e737667)](https://opencollective.com/casbin/sponsor/8/website)[![](https://camo.githubusercontent.com/0dd740886f32616e20426154f19ea5d85e73b444cc32d108e7264753ddd8178c/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f63617362696e2f73706f6e736f722f392f6176617461722e737667)](https://opencollective.com/casbin/sponsor/9/website)

License
-------

[](#license)

This project is licensed under the [Apache 2.0 license](LICENSE).

Contact
-------

[](#contact)

If you have any issues or feature requests, please contact us. PR is welcomed.

-
-
- Tencent QQ group: [546057381](//shang.qq.com/wpa/qunwpa?idkey=8ac8b91fc97ace3d383d0035f7aa06f7d670fd8e8d4837347354a31c18fac885)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60.8% 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 ~0 days

Total

2

Last Release

772d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b6e2e4673bbe0ff753edbf4593e2d1f26d8752364f15596bdcb4bab99dce8c1?d=identicon)[nick-scalewest](/maintainers/nick-scalewest)

---

Top Contributors

[![leeqvip](https://avatars.githubusercontent.com/u/35752209?v=4)](https://github.com/leeqvip "leeqvip (138 commits)")[![basakest](https://avatars.githubusercontent.com/u/47746206?v=4)](https://github.com/basakest "basakest (32 commits)")[![hsluoyz](https://avatars.githubusercontent.com/u/3787410?v=4)](https://github.com/hsluoyz "hsluoyz (20 commits)")[![kang8](https://avatars.githubusercontent.com/u/36906329?v=4)](https://github.com/kang8 "kang8 (18 commits)")[![mavimo](https://avatars.githubusercontent.com/u/43941?v=4)](https://github.com/mavimo "mavimo (7 commits)")[![Zxilly](https://avatars.githubusercontent.com/u/31370133?v=4)](https://github.com/Zxilly "Zxilly (2 commits)")[![smallsung](https://avatars.githubusercontent.com/u/7710878?v=4)](https://github.com/smallsung "smallsung (1 commits)")[![sukui](https://avatars.githubusercontent.com/u/2092717?v=4)](https://github.com/sukui "sukui (1 commits)")[![techqiang](https://avatars.githubusercontent.com/u/47626662?v=4)](https://github.com/techqiang "techqiang (1 commits)")[![uax](https://avatars.githubusercontent.com/u/10324413?v=4)](https://github.com/uax "uax (1 commits)")[![lorenzomar](https://avatars.githubusercontent.com/u/612386?v=4)](https://github.com/lorenzomar "lorenzomar (1 commits)")[![acgrid](https://avatars.githubusercontent.com/u/7407146?v=4)](https://github.com/acgrid "acgrid (1 commits)")[![javi-p-nt](https://avatars.githubusercontent.com/u/40266819?v=4)](https://github.com/javi-p-nt "javi-p-nt (1 commits)")[![kyle-mccarthy](https://avatars.githubusercontent.com/u/7758522?v=4)](https://github.com/kyle-mccarthy "kyle-mccarthy (1 commits)")[![0x8f701](https://avatars.githubusercontent.com/u/33961674?v=4)](https://github.com/0x8f701 "0x8f701 (1 commits)")[![M1serry](https://avatars.githubusercontent.com/u/87843973?v=4)](https://github.com/M1serry "M1serry (1 commits)")

---

Tags

authorizationaclpermissionrbacaccess-controlabaccasbin

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nick-scalewest-php-casbin/health.svg)

```
[![Health](https://phpackages.com/badges/nick-scalewest-php-casbin/health.svg)](https://phpackages.com/packages/nick-scalewest-php-casbin)
```

###  Alternatives

[casbin/casbin

a powerful and efficient open-source access control library for php projects.

1.3k1.4M54](/packages/casbin-casbin)[casbin/laravel-authz

An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.

324339.9k4](/packages/casbin-laravel-authz)[casbin/think-authz

An authorization library that supports access control models like ACL, RBAC, ABAC for ThinkPHP.

27918.5k6](/packages/casbin-think-authz)[casbin/webman-permission

webman casbin permission plugin

523.4k2](/packages/casbin-webman-permission)[casbin/codeigniter-permission

Associate users with roles and permissions, use Casbin in CodeIgniter4 Web Framework.

443.0k](/packages/casbin-codeigniter-permission)[efficiently/authority-controller

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

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

PHPackages © 2026

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