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

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

perer876/permission
===================

Lightweight, enum-based definition, querying and mapping of permissions in PHP applications.

v1.0.0-beta.1(9mo ago)42.9k↓45.5%[1 issues](https://github.com/Perer876/guard/issues)MITPHPPHP &gt;=8.4|&gt;=8.5CI passing

Since Jul 8Pushed 9mo agoCompare

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

READMEChangelog (5)Dependencies (6)Versions (5)Used By (0)

Important

Still in development, not feature complete.

Guard
=====

[](#guard)

Lightweight, enum-based definition, querying and mapping of permissions in PHP applications.

Usage
-----

[](#usage)

You can define roles and permissions using an enum.

For example, you can define roles like this:

```
