PHPackages                             wnikk/laravel-access-rules - 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. wnikk/laravel-access-rules

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

wnikk/laravel-access-rules
==========================

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

2.2.30(1mo ago)103.6k11MITPHPPHP &gt;=7.4

Since Mar 10Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/wnikk/laravel-access-rules)[ Packagist](https://packagist.org/packages/wnikk/laravel-access-rules)[ Docs](https://github.com/wnikk/laravel-access-rules)[ RSS](/packages/wnikk-laravel-access-rules/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (16)Versions (16)Used By (1)

[![Laravel Access Control Rules](https://raw.githubusercontent.com/wnikk/laravel-access-rules/main/docs/art/laravel-access-control-rules-logo.png)](https://raw.githubusercontent.com/wnikk/laravel-access-rules/main/docs/art/laravel-access-control-rules-logo.png)

Access Control Rules (Laravel Permissions Package)
==================================================

[](#access-control-rules-laravel-permissions-package)

[![License](https://camo.githubusercontent.com/7ff5ee2e1f3e29bbb29f5f2d0e5aa3d299647576408f1185908b4adb57ab9644/68747470733a2f2f706f7365722e707567782e6f72672f776e696b6b2f6c61726176656c2d6163636573732d72756c65732f6c6963656e7365)](//packagist.org/packages/wnikk/laravel-access-rules)[![Code Climate](https://camo.githubusercontent.com/73041f5ec1497d074990dd0b1b476b06adc4f4f8622d0f0040d4af97fefebe1d/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f776e696b6b2f6c61726176656c2d6163636573732d72756c65732f6261646765732f6770612e737667)](//codeclimate.com/github/wnikk/laravel-access-rules)[![PHP Version Require](https://camo.githubusercontent.com/37edc7a2a7af4e957602f7051b97f8124aa7fa61b1b7f2c3c60f7c0bf8e4df2d/687474703a2f2f706f7365722e707567782e6f72672f776e696b6b2f6c61726176656c2d6163636573732d72756c65732f726571756972652f706870)](//packagist.org/packages/wnikk/laravel-access-rules)[![Total Downloads](https://camo.githubusercontent.com/631715b9db5bd8a8321a77a738de2eebcf7045b0d71296cc12801fd80df68793/687474703a2f2f706f7365722e707567782e6f72672f776e696b6b2f6c61726176656c2d6163636573732d72756c65732f646f776e6c6f616473)](//packagist.org/packages/wnikk/laravel-access-rules)[![Latest Stable Version](https://camo.githubusercontent.com/d1aa4adf4f7c51db975f8273e9bdab9de91d6acd8c044fc2bb1487279709664b/68747470733a2f2f706f7365722e707567782e6f72672f776e696b6b2f6c61726176656c2d6163636573732d72756c65732f76)](//packagist.org/packages/wnikk/laravel-access-rules)[![Latest Unstable Version](https://camo.githubusercontent.com/142ba0a34e9042e5089abd973cb70eb734ccc323269b200d4b35394ef3601489/687474703a2f2f706f7365722e707567782e6f72672f776e696b6b2f6c61726176656c2d6163636573732d72756c65732f762f756e737461626c65)](//packagist.org/packages/wnikk/laravel-access-rules)

What does Access Control Rules support?
---------------------------------------

[](#what-does-access-control-rules-support)

- Multiple user models.
- Multiple permissions can be attached to users.
- Multiple permissions can be attached to groups.
- Permissions verification.
- Permissions caching.
- Events when permissions are attached, detached or synced.
- Multiple permissions can be attached to user or group.
- Permissions can be inherited with unlimited investment from users and groups.
- Laravel gates and policies.

Visual Interface
----------------

[](#visual-interface)

The visual interface for managing access control rules and permissions can be found at [this link](https://github.com/wnikk/laravel-access-ui). It offers an intuitive and user-friendly environment for administrators to define roles, assign permissions, and configure access rules.

For detailed usage examples and instructions, refer to the [example repository](https://github.com/wnikk/-laravel-access-example).

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

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

See the [documentation](https://github.com/wnikk/laravel-access-rules/tree/master/docs) for detailed installation and usage instructions.

Versions &amp; Dependencies
---------------------------

[](#versions--dependencies)

Laravel Access Control RulesPHPLaravel2.x7.4 - 8.48 - 131.x7.1 - 7.35.5 - 8You can install the package using composer:
-------------------------------------------

[](#you-can-install-the-package-using-composer)

```
composer require wnikk/laravel-access-rules
```

See the [installation page](https://github.com/wnikk/laravel-access-rules/blob/main/docs/installation.md) for detailed.

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

[](#what-it-does)

This package allows you to manage user permissions and groups (instead roles) in a database.

Once installed you can do stuff like this:

```
use Wnikk\LaravelAccessRules\AccessRules;

// Add new rule permission
AccessRules::newRule('articles.edit', 'Access to editing articles');
```

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

Or you can inherit the rights from another user or groups

```
// According to the existing user from object
$user->inheritPermissionFrom(User::find(1));

// By identifier
$user->inheritPermissionFrom(User::class, 1);

// From the group
$user->inheritPermissionFrom('Group', 1);
```

Because all permissions will be registered on **Laravel's gate**, you can check if a user has a permission with Laravel's default `can` function:

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

Or without model:

```
$acr = new AccessRules;
$acr->setOwner('AnotherAnySystemUser', 'UserID-From-Any-System-FF01');
$check = $acr->can('articles.edit');
if (!$check) {abort(403);}
```

Examples of how can be used in more detail described in [Basic Usage](https://github.com/wnikk/laravel-access-rules/blob/main/docs/basic-usage.md) section.

Opening an Issue
----------------

[](#opening-an-issue)

Before opening an issue there are a couple of considerations:

- You are all awesome!
- Pull requests are more than welcome.
- **Read the instructions** and make sure all steps were *followed correctly*.
- **Check** that the issue is not *specific to your development environment* setup.
- **Provide** *duplication steps*.
- **Attempt to look into the issue**, and if you *have a solution, make a pull request*.
- **Show that you have made an attempt** to *look into the issue*.
- **Check** to see if the issue you are *reporting is a duplicate* of a previous reported issue.
- **Following these instructions show me that you have tried.**
- Please be considerate that this is an open source project that I provide to the community for FREE when opening an issue.

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

[](#alternatives)

- [spatie/laravel-permission](https://github.com/spatie/laravel-permission) takes a slightly different approach to its features.
- [ultraware/roles](https://github.com/ultraware/roles) It not supported and transferred to archive.
- [santigarcor/laratrust](https://github.com/santigarcor/laratrust) implements team support.
- [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

48

—

FairBetter than 95% of packages

Maintenance89

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

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

Recently: every ~59 days

Total

15

Last Release

55d ago

Major Versions

1.0.4 → 2.0.12023-03-16

PHP version history (2 changes)1.0.4PHP ^7.4|^8.0

2.0.1PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d697f254abf31ac021e96b8b3b716bd32ad5a43187e3bbdc3a9813cf9c0db26?d=identicon)[Nikolya](/maintainers/Nikolya)

---

Top Contributors

[![wnikk](https://avatars.githubusercontent.com/u/119752633?v=4)](https://github.com/wnikk "wnikk (72 commits)")

---

Tags

aclacrauthorizationlaravelmultiuserpermissionsphprbacrolessecurelaravelsecuritymanageraclpermissionrolespermissionsrbacruleswnikkacr

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wnikk-laravel-access-rules/health.svg)

```
[![Health](https://phpackages.com/badges/wnikk-laravel-access-rules/health.svg)](https://phpackages.com/packages/wnikk-laravel-access-rules)
```

###  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)[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)
