PHPackages                             aginev/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. aginev/acl

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

aginev/acl
==========

ACL package for Laravel v5.0

1.1.5(8y ago)6171[1 issues](https://github.com/aginev/acl/issues)MITPHPPHP &gt;=5.5.9

Since Jun 16Pushed 8y ago2 watchersCompare

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

READMEChangelog (7)Dependencies (7)Versions (9)Used By (0)

ACL For Laravel 5
-----------------

[](#acl-for-laravel-5)

Access control list implementation form Laravel 5. Gives you roles and permissions for build in Laravel 5 Auth.

Features
--------

[](#features)

- CRUD for roles
- CRUD fot permissions
- Route middleware for checking user permissions
- Artisan command for parsing and adding newly created ACL dependant modules
- Composer installable
- PSR4 auto loading
- PSR2 code formatting

Requires
--------

[](#requires)

Build only for Laravel Framework only! The package required Glyph icons ().

```
"require": {
	"php": ">=5.5.9",
	"illuminate/foundation": "5.*",
	"illuminate/contracts": "5.*",
	"illuminate/database": "5.*",
	"illuminate/routing": "5.*",
	"illuminate/support": "5.*",
	"illuminate/view": "5.*",
	"illuminate/html": "5.*"
}
```

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

[](#installation)

Require package at your composer.json file like so

```
{
    "require": {
        "aginev/acl": "1.1.*"
    }
}
```

Tell composer to update your dependencies

```
composer update
```

Or in terminal

```
composer require aginev/acl:1.1.*
```

Add Service Provider to your config/app.php like so

```
Aginev\Acl\AclServiceProvider::class,
```

Publish package assets

```
php artisan vendor:publish --provider="Aginev\Acl\AclServiceProvider" --tag="public"
```

Add package CSS to your layout

```

```

Add package javascript to your layout.

- script.js to be able to define role permission easily
- restful.js to be able to execute RESTful delete

Feel free to make your own implementation if you don't have one already.

```

```

Add Laravel csrf token as a javascript object. Required only if use restful.js.

```

	Laravel = {
		_token: '{{ csrf_token() }}'
	};

```

Run package migrations. You need to have your users table migrated.

```
php artisan migrate --path="vendor/aginev/acl/src/Database/Migrations"
```

Seed the roles table. By default it will create two roles- No Permissions and Admin. No Permissions roles will be considered as a default role. You will be not able to delete this role. When deleting other role, all users using deleted role will be assigned to No Permissions role. By default the seeder will add all resources requesting ACL and will assign them to Admin role.

```
php artisan db:seed --class="Aginev\Acl\Database\Seeds\RolesTableSeeder"
```

Modify one or more of your users to have a valid role\_id. By default the added role\_id foreign key will have a value of NULL

Add ACL user trait to your User model. It will add definition for the relation between roles and users table;

```
use \Aginev\Acl\Http\Traits\User;
```

At this point you have ACL up and running. Access roles and permissions CRUD at:

/admin/role

/admin/permission

Not happy with the route prefix? Publish the package config and edit routes\_prefix value for your own or leave it blank for no prefix.

```
php artisan vendor:publish --provider="Aginev\Acl\AclServiceProvider" --tag="config"
```

Edit route prefix

```
...
// Package route prefix. Set to blank for no prefix
'routes_prefix' => 'what-ever-you-want',
...
```

Package has a pagination in index views. If you need more items per page, edit per\_page\_results (default to 25) value at the config.

```
...
// Pagination per page results
'per_page_results' => 50,
...
```

To define custom error messages format, edit validation\_errors\_format value at the config. This format will be applied only if your controllers are extending ACL base controller (\\Aginev\\Acl\\Http\\Controllers\\AclController).

```
// validation errors format. Set to blank for default
'validation_errors_format' => ':message',
```

And the most important thing... you want your controller to be ACL dependent. There two options for this.

1.Add ACL middleware at your controller constructor.

```
$this->middleware('acl');
```

2.Route group at routes.php

```
Route::group(['middleware' => 'acl'], function () {
	Route::get('group', 'SomeController@index');
});
```

After defining a ACL protected controllers like this you are able to run artisan command that will add all the routes in the permissions table

```
php artisan acl:fill-permissions
```

If you want to assign new permissions to role you can do it like so

```
php artisan acl:fill-permissions --assign-to-roles=2
```

Where 2 is the role\_id. If you want pass many roles do it with comma separates list If you want to assign new permissions to role you can do it like so

```
php artisan acl:fill-permissions --assign-to-roles=1,2
```

### Modifying default view

[](#modifying-default-view)

To modify default views you need to publish them

```
php artisan vendor:publish --provider="Aginev\Acl\AclServiceProvider" --tag="views"
```

### Other

[](#other)

Publish migrations

```
php artisan vendor:publish --provider="Aginev\Acl\AclServiceProvider" --tag="migrations"
```

Publish seeds

```
php artisan vendor:publish --provider="Aginev\Acl\AclServiceProvider" --tag="seeds"
```

License
-------

[](#license)

MIT -

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~168 days

Recently: every ~252 days

Total

7

Last Release

2980d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.4.0

v1.1.0PHP &gt;=5.5.9

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8341783?v=4)[Atanas Ginev](/maintainers/aginev)[@aginev](https://github.com/aginev)

---

Top Contributors

[![aginev-fos](https://avatars.githubusercontent.com/u/13101821?v=4)](https://github.com/aginev-fos "aginev-fos (36 commits)")[![aginev](https://avatars.githubusercontent.com/u/8341783?v=4)](https://github.com/aginev "aginev (9 commits)")

---

Tags

aclrolespermissionsLaravel Authlaravel 5.0permissions and roles

### Embed Badge

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

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

###  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)[yajra/laravel-acl

Laravel ACL is a simple role, permission ACL for Laravel Framework.

112103.9k1](/packages/yajra-laravel-acl)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6712.1k2](/packages/hasinhayder-tyro)[beatswitch/lock-laravel

A Laravel Driver for Lock.

15529.1k1](/packages/beatswitch-lock-laravel)[directorytree/authorization

Native Laravel Authorization.

1809.5k](/packages/directorytree-authorization)

PHPackages © 2026

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