PHPackages                             vientoquesurcalosmares/laravel-acl - 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. [Database &amp; ORM](/categories/database)
4. /
5. vientoquesurcalosmares/laravel-acl

ActiveLibrary[Database &amp; ORM](/categories/database)

vientoquesurcalosmares/laravel-acl
==================================

Light-weight role-based permissions for Laravel 5 built in Auth system.

2.1(11mo ago)097MITPHPPHP &gt;=7.2

Since Feb 24Pushed 11mo agoCompare

[ Source](https://github.com/vientoquesurcalosmares/laravel-acl)[ Packagist](https://packagist.org/packages/vientoquesurcalosmares/laravel-acl)[ RSS](/packages/vientoquesurcalosmares-laravel-acl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (22)Used By (0)

Kodeine/Laravel-ACL
===================

[](#kodeinelaravel-acl)

[![Laravel](https://camo.githubusercontent.com/532da8ea0a303ec469774829517af33e851a04c448e0bbc47add5558d4e5513d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d7e392e302d677265656e2e7376673f7374796c653d666c61742d737175617265)](http://laravel.com)[![Source](https://camo.githubusercontent.com/9eb80c3f4dee40969dd5f62bc478963b0c85354d294b5c1fb74dd1f30b727561/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d6b6f6465696e652f6c61726176656c2d2d61636c2d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/kodeine/laravel-acl/)[![Build Status](https://camo.githubusercontent.com/069c540b588c9ace0c0a03a6d1f29acfd0963c1f0791bad0a89e91df7eacbd6e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6b6f6465696e652f6c61726176656c2d61636c2f6d61737465723f7374796c653d666c61742d737175617265)](https://travis-ci.org/kodeine/laravel-acl)[![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://tldrlegal.com/license/mit-license)[![Total Downloads](https://camo.githubusercontent.com/688fe08d0397f1e652b6608ae0c4388b164a84913448f9b6779b2147f41c8e4b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6f6465696e652f6c61726176656c2d61636c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kodeine/laravel-acl)

Laravel ACL adds role based permissions to built in Auth System of Laravel 9.0+. ACL middleware protects routes and even crud controller methods.

Table of Contents
=================

[](#table-of-contents)

- [Requirements](#requirements)
- [Getting Started](#getting-started)
- [Documentation](#documentation)
- [Roadmap](#roadmap)
- [Change Logs](#change-logs)
- [Contribution Guidelines](#contribution-guidelines)

Requirements
====================================================

[](#requirements)

- Version 2.x of this package requires PHP 7.2+ and Laravel 6.0+
- Version 1.x requires PHP 5.6+ and Laravel 5.0+

Getting Started
==========================================================

[](#getting-started)

Install the package using composer

```
composer require kodeine/laravel-acl

```

If you need to support Laravel 5.x, make sure to install version 1.x

```
composer require kodeine/laravel-acl "^1.0"

```

2. If you are using Laravel before version 5.4, manually register the service provider in your config/app.php file

```
'providers' => [
    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Kodeine\Acl\AclServiceProvider',
],
```

3. Publish the package configuartion files and add your own models to the list of ACL models"

```
$ php artisan vendor:publish --provider="Kodeine\Acl\AclServiceProvider"

```

> **Once you publish, it publishes the configuration file where you can:**
>
> - **Use your own models**: Define your own models which should extend to Acl models.
> - **Use your own guard**: Define a guard other than laravel default for user recovery.

4. Add the middleware to your `app/Http/Kernel.php`.

```
protected $routeMiddleware = [
    ....
    'acl' => 'Kodeine\Acl\Middleware\HasPermission',
];
```

5. Add the HasRole trait to your `User` model.

```
use Kodeine\Acl\Traits\HasRole;

class User extends Model implements AuthenticatableContract, CanResetPasswordContract
{
    use Authenticatable, CanResetPassword, HasRole;
}
```

6. Run the migrations to generate your roles and permissions tables

Please note that if you are upgrading to 6.0 from a previous version, the default column type for the id on the users table has changed. On certain databases foreign keys can only be defined with matching column types. As such, you will need to change the id column on your users table to bigInteger in to user this package.

```
php artisan migrate

```

Documentation
======================================================

[](#documentation)

Follow along the [Wiki](https://github.com/kodeine/laravel-acl/wiki) to find out more.

Roadmap
==========================================

[](#roadmap)

Here's the TODO list for the next release.

- Refactoring the source code.
- Correct all issues.
- Adding cache to final user permissions.

Change Logs
==================================================

[](#change-logs)

**June 14 2022**

- Added support for different guard

**September 14 2019**

- Updated the readme to reflect new major release

**September 13, 2019**

- Added support for Laravel 6

*September 22, 2016*\*

- Added unit tests

*September 20, 2016*\*

- Added support for Laravel 5.3

*September 19, 2016*

- Added cache support to Roles and Permissions.

*June 14, 2015*

- Added backward compatibility to l5.0 for lists() method.
- Added [Blade Template Extensions](https://github.com/kodeine/laravel-acl/wiki/Blade-Extensions).

*March 28, 2015*

- Added Role Scope to get all users having a specific role. e.g `User::role('admin')->get();` will list all users having `admin` role.

*March 7, 2015*

- `is()` and `can()` methods now support comma for `AND` and pipe as `OR` operator. Or pass an operator as a second param. [more information](https://github.com/kodeine/laravel-acl/wiki/Validate-Permissions-and-Roles)
- You can bind multiple permissions together so they inherit ones permission. [more information](https://github.com/kodeine/laravel-acl/wiki/Permissions-Inheritance)

Contribution Guidelines
==========================================================================

[](#contribution-guidelines)

Support follows PSR-2 PHP coding standards, and semantic versioning.

Please report any issue you find in the issues page. Pull requests are welcome.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance50

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 65.4% 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 ~220 days

Recently: every ~296 days

Total

18

Last Release

350d ago

Major Versions

v0.1.3 → 1.0.02018-02-12

1.0.x-dev → 2.0.02019-09-18

PHP version history (3 changes)v0.1.0PHP &gt;=5.4.0

1.0.0PHP &gt;=5.5.9

2.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/46b876b30b1d77ce2e22a7eac955288be3bcdf18569151c38a17ca81e7070641?d=identicon)[vientoquesurcalosmares](/maintainers/vientoquesurcalosmares)

---

Top Contributors

[![kodeine](https://avatars.githubusercontent.com/u/8620059?v=4)](https://github.com/kodeine "kodeine (119 commits)")[![alec-joy](https://avatars.githubusercontent.com/u/53278233?v=4)](https://github.com/alec-joy "alec-joy (10 commits)")[![ajoy39](https://avatars.githubusercontent.com/u/4281903?v=4)](https://github.com/ajoy39 "ajoy39 (5 commits)")[![heukirne](https://avatars.githubusercontent.com/u/97672?v=4)](https://github.com/heukirne "heukirne (5 commits)")[![stygiansabyss](https://avatars.githubusercontent.com/u/4187442?v=4)](https://github.com/stygiansabyss "stygiansabyss (4 commits)")[![screencomuser](https://avatars.githubusercontent.com/u/29376713?v=4)](https://github.com/screencomuser "screencomuser (4 commits)")[![CodeIgor](https://avatars.githubusercontent.com/u/43784724?v=4)](https://github.com/CodeIgor "CodeIgor (3 commits)")[![vientoquesurcalosmares](https://avatars.githubusercontent.com/u/41802038?v=4)](https://github.com/vientoquesurcalosmares "vientoquesurcalosmares (3 commits)")[![rafaelpv](https://avatars.githubusercontent.com/u/14228330?v=4)](https://github.com/rafaelpv "rafaelpv (3 commits)")[![damiandriscoll](https://avatars.githubusercontent.com/u/11833788?v=4)](https://github.com/damiandriscoll "damiandriscoll (3 commits)")[![mivale](https://avatars.githubusercontent.com/u/197782?v=4)](https://github.com/mivale "mivale (2 commits)")[![IlyaSavich](https://avatars.githubusercontent.com/u/12517348?v=4)](https://github.com/IlyaSavich "IlyaSavich (2 commits)")[![CptMeatball](https://avatars.githubusercontent.com/u/1681727?v=4)](https://github.com/CptMeatball "CptMeatball (2 commits)")[![uzegonemad](https://avatars.githubusercontent.com/u/430255?v=4)](https://github.com/uzegonemad "uzegonemad (2 commits)")[![rjackson](https://avatars.githubusercontent.com/u/602850?v=4)](https://github.com/rjackson "rjackson (1 commits)")[![tolawho](https://avatars.githubusercontent.com/u/12527881?v=4)](https://github.com/tolawho "tolawho (1 commits)")[![tylerwiegand](https://avatars.githubusercontent.com/u/11890164?v=4)](https://github.com/tylerwiegand "tylerwiegand (1 commits)")[![vanderson139](https://avatars.githubusercontent.com/u/10463966?v=4)](https://github.com/vanderson139 "vanderson139 (1 commits)")[![chrisschaetzlein](https://avatars.githubusercontent.com/u/15922483?v=4)](https://github.com/chrisschaetzlein "chrisschaetzlein (1 commits)")[![chris-doehring](https://avatars.githubusercontent.com/u/6341536?v=4)](https://github.com/chris-doehring "chris-doehring (1 commits)")

---

Tags

laravelsecurityautheloquentaclrolespermissions

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vientoquesurcalosmares-laravel-acl/health.svg)

```
[![Health](https://phpackages.com/badges/vientoquesurcalosmares-laravel-acl/health.svg)](https://phpackages.com/packages/vientoquesurcalosmares-laravel-acl)
```

###  Alternatives

[kodeine/laravel-acl

Light-weight role-based permissions for Laravel 5 built in Auth system.

782354.8k5](/packages/kodeine-laravel-acl)[silber/bouncer

Eloquent roles and abilities.

3.6k4.4M25](/packages/silber-bouncer)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[laravel-doctrine/acl

ACL for Laravel and Doctrine

44445.3k7](/packages/laravel-doctrine-acl)[phpzen/laravel-rbac

Role based access control for Laravel 5

383.2k](/packages/phpzen-laravel-rbac)

PHPackages © 2026

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