PHPackages                             capstonelogic/laravel-auth - 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. capstonelogic/laravel-auth

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

capstonelogic/laravel-auth
==========================

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

3.0.1(6y ago)08MITPHPPHP &gt;=7.2

Since Feb 24Pushed 6y agoCompare

[ Source](https://github.com/capstonelogic/laravel-auth)[ Packagist](https://packagist.org/packages/capstonelogic/laravel-auth)[ RSS](/packages/capstonelogic-laravel-auth/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (4)Versions (11)Used By (0)

CapstoneLogic/Laravel-ACL
=========================

[](#capstonelogiclaravel-acl)

[![Laravel](https://camo.githubusercontent.com/9285611a91c91dd261eecbf29c749a046490283a5ca9c3f8e000ce8464827b99/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d7e362e302d677265656e2e7376673f7374796c653d666c61742d737175617265)](http://laravel.com)[![Source](https://camo.githubusercontent.com/cc742b8a1fb0aef1bac5594020ee0ee548ac46560d968503bea7e5c7bc4b7310/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d43617073746f6e654c6f6769632f6c61726176656c2d2d61636c2d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/CapstoneLogic/laravel-acl/)[![Build Status](https://camo.githubusercontent.com/8af6e7c490273e9700909135aa3e305e2a4284dcf71ba8a8f75874db2ef784d2/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f43617073746f6e654c6f6769632f6c61726176656c2d61636c2f6d61737465723f7374796c653d666c61742d737175617265)](https://travis-ci.org/CapstoneLogic/laravel-acl)[![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://tldrlegal.com/license/mit-license)[![Total Downloads](https://camo.githubusercontent.com/ef41224229ea845834e6df88d6453dc4ef58dc187a4fd2c7ea73c8b1959db19e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f43617073746f6e654c6f6769632f6c61726176656c2d75736572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/CapstoneLogic/laravel-acl)

Laravel ACL adds role based permissions to built in Auth System of Laravel 6.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 CapstoneLogic/laravel-acl

```

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

```
composer require CapstoneLogic/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',
    ...
    'CapstoneLogic\Auth\AuthServiceProvider',
],
```

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

```
$ php artisan vendor:publish --provider="CapstoneLogic\Auth\AuthServiceProvider"

```

> **Use your own models.**Once you publish, it publishes the configuration file where you can define your own models which should extend to Acl models.

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

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

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

```
use CapstoneLogic\Auth\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/CapstoneLogic/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)

**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/CapstoneLogic/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/CapstoneLogic/laravel-acl/wiki/Validate-Permissions-and-Roles)
- You can bind multiple permissions together so they inherit ones permission. [more information](https://github.com/CapstoneLogic/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

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 67.1% 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 ~189 days

Recently: every ~10 days

Total

10

Last Release

2384d ago

Major Versions

v0.1.3 → 1.0.02018-02-12

1.0.0 → 2.0.02019-09-18

2.0.2 → 3.0.02019-10-29

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/50c048e7684ace3d693c7bc59983d1982591316f15d0e6fea983896ecde3e1f7?d=identicon)[pavlyshyn](/maintainers/pavlyshyn)

---

Top Contributors

[![kodeine](https://avatars.githubusercontent.com/u/8620059?v=4)](https://github.com/kodeine "kodeine (106 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)")[![pavlyshyn](https://avatars.githubusercontent.com/u/1117511?v=4)](https://github.com/pavlyshyn "pavlyshyn (3 commits)")[![rafaelpv](https://avatars.githubusercontent.com/u/14228330?v=4)](https://github.com/rafaelpv "rafaelpv (3 commits)")[![IlyaSavich](https://avatars.githubusercontent.com/u/12517348?v=4)](https://github.com/IlyaSavich "IlyaSavich (2 commits)")[![mivale](https://avatars.githubusercontent.com/u/197782?v=4)](https://github.com/mivale "mivale (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)")[![peetersdiet](https://avatars.githubusercontent.com/u/863974?v=4)](https://github.com/peetersdiet "peetersdiet (1 commits)")[![vjandrea](https://avatars.githubusercontent.com/u/1639757?v=4)](https://github.com/vjandrea "vjandrea (1 commits)")[![rjackson](https://avatars.githubusercontent.com/u/602850?v=4)](https://github.com/rjackson "rjackson (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)")[![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)")[![Lagg](https://avatars.githubusercontent.com/u/2509793?v=4)](https://github.com/Lagg "Lagg (1 commits)")

---

Tags

laravelsecurityautheloquentaclrolespermissions

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/capstonelogic-laravel-auth/health.svg)

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

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