PHPackages                             codegor/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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. codegor/laravel-acl

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

codegor/laravel-acl
===================

Resource Laravel ACL and Resource ACL for Laravel Model by it status based on Laravel route table. Easy code, easy control

v0.6(7y ago)22MITPHPPHP &gt;=7.0

Since Jun 30Pushed 7y ago2 watchersCompare

[ Source](https://github.com/codegor/laravel-acl)[ Packagist](https://packagist.org/packages/codegor/laravel-acl)[ Docs](https://github.com/codegor/laravel-acl)[ RSS](/packages/codegor-laravel-acl/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Codegor/laravel-acl
===================

[](#codegorlaravel-acl)

[![Laravel](https://camo.githubusercontent.com/fb827c6743f59c9a9a0bff92a44c05064e70510d1aa04ae0ddfb1cb9d330a105/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d7e352e362d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](http://laravel.com)[![Source](https://camo.githubusercontent.com/6fae3ebed154016c185b9317e18ea5000b83aea6bd7ec2ca0a585a84995afdd4/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d636f6465676f722f6c61726176656c2d2d61636c2d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/codegor/laravel-acl/)[![Build Status](https://camo.githubusercontent.com/3910692df5bc86154bc7cc73857a2c8b62d4e0670ba1b3a5e77acaadcf655bd2/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f636f6465676f722f6c61726176656c2d2d61636c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/codegor/laravel-acl)[![License](https://camo.githubusercontent.com/30597ff9a350144f03bffdd9183e16468e0b3ca1193e1d08591d992622738d55/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://tldrlegal.com/license/mit-license)[![Total Downloads](https://camo.githubusercontent.com/383c6bd2377a488876bf183338dc28eb24d21d8ac60f3e8cf0fe6f8d725553a0/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6465676f722f6c61726176656c2d61636c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codegor/laravel-acl)

Laravel ACL adds role based permissions to built in Auth System of Laravel 5.6. ACL middleware protects routes. Useful when laravel use for server api(with resource controller). Current ACL can control resource by its statuses (very usfull if you need control what actions need deny). If model has some status, for example, model has status 'active' and you want to deny action 'update' - with this ACL you can set this in the config at state field (see below).

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

[](#table-of-contents)

- [Requirements](#requirements)
- [Getting Started](#getting-started)

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

[](#requirements)

- This package requires PHP 7.0+

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

[](#getting-started)

1. Require the package in your `composer.json` and update your dependency with `composer update`:

```
"require": {
...
"codegor/laravel-acl": "~0.5",
...
},

```

2. Add the package to your application service providers in `config/app.php`.

```
'providers' => [

Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
...
Codegor\Acl\Providers\AclServiceProvider::class,

],
'aliases' => [

'App' => Illuminate\Support\Facades\App::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
...
'Acl' => Codegor\Acl\Facades\Acl::class
]
```

3. Publish the package config to your application. if you want def migration has on migrations folder at root folder of packege.

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

```

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

```
protected $routeMiddleware = [

....
'acl' => 'Codegor\Acl\Http\Middleware\Acl',

];
```

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

```
use Codegor\Acl\Traits\Acl;

class User extends Model
{
use ... Acl;
}
```

6. Config your acl on config/acl.php (Detail on the comments at config/acl.php file).

```
return [
  'config' => [
    'role_source' => 'config' // 'config' || 'DB'
	...
  ],
  'permissions' => [
      'admin' => (object) [
        'role' => 'admin',
        'type' => 'all allow', // or 'all deny'
        'list' => [] // if in table - need in json formate
      ],
	  ...
  ]
  'state' => [
    'admins' => [ // resourse
      'active' =>[ // status #1
        'activate'
      ],
      'inactive' =>[ // status #2
        'update'
      ],
    ],
    ...
  ]
];
```

That's All!

For creating permission list you can exec artisan command 'php artisan route:list' and you can see your rout table and col route name, this col you are need for list in the permission list (at middleware col you can see your acl middleware with others middleware). Acl works only if you apply 'acl' middleware. (For internal needs you can use Acl::getPointsApp() which return the list of all permissions)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.3% 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

Unknown

Total

1

Last Release

2876d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e9e386856732356d04640e20335a035d8c57642724bfbc084bb24c59c51ec44a?d=identicon)[codegor](/maintainers/codegor)

---

Top Contributors

[![Gabrielllllll](https://avatars.githubusercontent.com/u/44298709?v=4)](https://github.com/Gabrielllllll "Gabrielllllll (23 commits)")[![codegor](https://avatars.githubusercontent.com/u/2156950?v=4)](https://github.com/codegor "codegor (6 commits)")

---

Tags

laravelaclpermissionpermissionsrightsaccess control listcodegor

### Embed Badge

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

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

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[wnikk/laravel-access-rules

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

103.6k1](/packages/wnikk-laravel-access-rules)

PHPackages © 2026

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