PHPackages                             matiosfree/l-rbac - 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. matiosfree/l-rbac

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

matiosfree/l-rbac
=================

The RBAC implementation for Laravel. Based on Laravel Abilities\\Gates.

v0.1.1(4y ago)09MITPHPPHP &gt;=7.4

Since Jul 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/matiosfree/l-rbac)[ Packagist](https://packagist.org/packages/matiosfree/l-rbac)[ Docs](https://github.com/matiosfree/l-rbac)[ RSS](/packages/matiosfree-l-rbac/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

l-rbac
------

[](#l-rbac)

The [RBAC](https://en.wikipedia.org/wiki/Role-based_access_control) implementation for Laravel. Based on Laravel Abilities\\Gates (v5+). This package implements a General Hierarchical RBAC, following the [implementation in Yii2](https://www.yiiframework.com/doc/guide/2.0/en/security-authorization#rbac)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d346215e07765538c5f5b4c7c776246a174bd7befd716132f501b32f2090ccb5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6174696f73667265652f6c2d726261632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/matiosfree/l-rbac)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/8afafd015b3a080fbc4756c8cead1c9bf192d5a7f02bce91dd056c1c2c520f6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6174696f73667265652f6c2d726261632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/matiosfree/l-rbac)

Installation
------------

[](#installation)

1. The preferred way to install this package is through [composer](http://getcomposer.org/download/). Either run

```
php composer require matiosfree/l-rbac "*"

```

or add

```
"matiosfree/l-rbac": "*"

```

to the require section of your composer.json.

2. Add the service provider to config/app.php.

```
MatiosFree\LRbac\RbacServiceProvider::class,
```

3. Publish service provider with command:

```
php artisan vendor:publish --provider="MatiosFree\LRbac\RbacServiceProvider"

```

4. Create Authorization class that extends **MatiosFree\\LRbac\\RbacAuthorization**:

```
