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

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

luizfabianonogueira/acl-permissions
===================================

ACL Permissions is a Laravel package that provides a robust and flexible access control system based on ACL (Access Control List). It allows you to define and manage permissions in a granular way for users and groups, ensuring that each resource is accessed only by those with proper authorization.

V0.1(1y ago)06LGPL-3.0-or-laterBladePHP &gt;=8.3

Since Oct 4Pushed 1y ago2 watchersCompare

[ Source](https://github.com/LuizFabianoNogueira/acl-permissions)[ Packagist](https://packagist.org/packages/luizfabianonogueira/acl-permissions)[ RSS](/packages/luizfabianonogueira-acl-permissions/feed)WikiDiscussions main Synced 1mo ago

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

[![Laravel Logo](src/Assets/img/laravel.png)](src/Assets/img/laravel.png)

ACL - Permisions
================

[](#acl---permisions)

[![Latest Stable Version](https://camo.githubusercontent.com/731a601890394d7686a08410e76513672f291c77db21d2cbc3078d4f1fab0260/68747470733a2f2f706f7365722e707567782e6f72672f6c75697a66616269616e6f6e6f6775656972612f61636c2d7065726d697373696f6e732f76)](//packagist.org/packages/luizfabianonogueira/acl-permissions)[![Total Downloads](https://camo.githubusercontent.com/7962f93cb6a61ebd903571e981f18af5714ca0c93537de5eafa7b36fa49518e8/68747470733a2f2f706f7365722e707567782e6f72672f6c75697a66616269616e6f6e6f6775656972612f61636c2d7065726d697373696f6e732f646f776e6c6f616473)](//packagist.org/packages/luizfabianonogueira/acl-permissions)[![Latest Unstable Version](https://camo.githubusercontent.com/816cdd790276943f63f2cd09464fea4445054e6d82a161d8c7d7e51b4225a896/68747470733a2f2f706f7365722e707567782e6f72672f6c75697a66616269616e6f6e6f6775656972612f61636c2d7065726d697373696f6e732f762f756e737461626c65)](//packagist.org/packages/luizfabianonogueira/acl-permissions)[![License](https://camo.githubusercontent.com/0c6849502b05fb79270d9fc554037bf09009f2410a62fe5bd9499f950c8a87e0/68747470733a2f2f706f7365722e707567782e6f72672f6c75697a66616269616e6f6e6f6775656972612f61636c2d7065726d697373696f6e732f6c6963656e7365)](//packagist.org/packages/luizfabianonogueira/acl-permissions)[![Static Badge](https://camo.githubusercontent.com/eebd5bfdde76751e19c05c39dfac218843bfa3648e1d959031a7b83308eed063/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f3a6261646765436f6e74656e74)](https://img.shields.io/badge/:badgeContent)

This package is a simple and easy way to manage permissions in Laravel applications.

[![Badge em Desenvolvimento](https://camo.githubusercontent.com/a226a1261dea445b7d6471781f9297775c38bc42f6a8b58b7367d80bf561fc7c/687474703a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d535441545553266d6573736167653d494e253230444556454c4f504d454e5426636f6c6f723d475245454e267374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/a226a1261dea445b7d6471781f9297775c38bc42f6a8b58b7367d80bf561fc7c/687474703a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d535441545553266d6573736167653d494e253230444556454c4f504d454e5426636f6c6f723d475245454e267374796c653d666f722d7468652d6261646765)

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

[](#installation)

You can install the package via composer:

```
composer require luizfabianonogueira/acl-permissions
```

Configuration
-------------

[](#configuration)

In bootstrp/app.php add the following line:

```
use LuizFabianoNogueira\AclPermissions\AclPermissionsServiceProvider;

return [
    ...
    AclPermissionsServiceProvider::class,
    ...
];
```

You can publish the config file with:

```
php artisan vendor:publish --tag="acl-permissions-config"
php artisan vendor:publish --tag="acl-permissions-migrations"
php artisan vendor:publish --tag="acl-permissions-views"
```

This is the contents of the published config file:

```
return [

    /**
     * Define the column type of the id in user table.
     */
    'user_id_is' => 'UUID', # INTEGER or UUID

    /**
     * Define the column type of the id in user table.
     */
    'role_id_is' => 'UUID', # INTEGER or UUID

    /**
     * The user model that should be used to retrieve your permissions.
     */
    'user' => App\Models\User::class,

    /**
     * The role model that should be used to retrieve your permissions.
     */
    'role' => null
];
```

### Extension UUID is available in Laravel 8.x \\

[](#extension-uuid-is-available-in-laravel-8x-)

### Verify if the UUID is enabled in your database.

[](#verify-if-the-uuid-is-enabled-in-your-database)

After publishing the config file and the migrations, run the migrations:

```
php artisan migrate
```

In your `User` model add the code below:

```
use LuizFabianoNogueira\AclPermissions\Models\Role;

    /**
     * Get the roles for the user.
     */
    public function roles(): BelongsToMany
    {
        return $this->belongsToMany(Role::class, 'role_user', 'user_id', 'role_id');
    }
```

In AppServiceProvider.php add the code below:

```
use LuizFabianoNogueira\AclPermissions\Services\AclPermissionService;

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        AclPermissionService::registerGates();
    }
```

In Bootstrap/app.php add the code below:

```
use LuizFabianoNogueira\AclPermissions\Http\Middleware\ACLPermissions;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        commands: __DIR__.'/../routes/console.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware) {
        $middleware->alias([
            'acl-permissions' => ACLPermissions::class
        ]);
    })
    ->withExceptions(function (Exceptions $exceptions) {
        //
    })->create();
```

In app/Http/Controllers/Auth/LoginController.php add the code below:

```
use LuizFabianoNogueira\AclPermissions\Services\AclPermissionService;

    /**
     * @return string
     */
    public function redirectTo(): string
    {
        AclPermissionService::loadPermissions();
        return $this->redirectTo;
    }
```

Usage
-----

[](#usage)

To access the permissions screen, access the url below:

```
https://[urlofyoursystem]/acl-permissions/permissions/list

```

[![img.png](src/Assets/img/img.png)](src/Assets/img/img.png)

### Permissions

[](#permissions)

On this screen, you can create, edit, and delete permissions. Permissions are used to control access to the application's routes. There are two ways to use permissions: \\

- URL, which is done through middleware comparing the route name with the permission name. In this case, you should pay attention to the route name structure. \\
- Gates or the user interface. @can

### Users

[](#users)

On the users screen you can just link the roles.

### Roles

[](#roles)

On the roles screen you can create, edit and delete roles. Then you can add permissions to roles. Roles are used to control access to application routes.

### License: LGPL-3.0-or-later

[](#license-lgpl-30-or-later)

---

---

Contact &amp; Support
---------------------

[](#contact--support)

[![LinkedIn](https://camo.githubusercontent.com/14bfd77712bb1778d3e44233232d09f4fc35598827336fb8f6530d211695e396/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c696e6b6564496e2d3030303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c696e6b6564696e266c6f676f436f6c6f723d7768697465)](https://www.linkedin.com/in/luiz-fabiano-nogueira-b20875170/)[![WhatsApp](https://camo.githubusercontent.com/e68369b430afdfd9fdc000b0dee866f550911e62ec35a17a8b0efa15ca84a2d1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f57686174734170702d3030303f7374796c653d666f722d7468652d6261646765266c6f676f3d7768617473617070266c6f676f436f6c6f723d7768697465)](https://api.whatsapp.com/send?phone=5548991779088)[![GitHub](https://camo.githubusercontent.com/c23b9de6309febd679c6c06bdb31cd13be6bdb5845d749d459fc71b01b3cf57e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769744875622d3030303f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465)](https://github.com/LuizFabianoNogueira)[![Packagist](https://camo.githubusercontent.com/ca5c937f8f8db574d438018218bcc069369d251b24cdb5110777230c70ba2ee6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5061636b61676973742d3030303f7374796c653d666f722d7468652d6261646765266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/luizfabianonogueira/)

📞 **Phone:** +5548991779088
✉️ **Email:**

---

### Support My Work

[](#support-my-work)

If you enjoyed this project and would like to support my work, any donation via Pix is greatly appreciated!
Feel free to donate using one of the following Pix keys:

💳 **Email Pix Key:** `luizfabianonogueira@gmail.com`
📱 **Phone Pix Key:** `48991779088`

Thank you for your support!

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

586d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3dad7d28d0352c0f0c1761814508ef21d6e8a6549211bc998c86108b5e4a8ce2?d=identicon)[LuizFabianoNogueira](/maintainers/LuizFabianoNogueira)

---

Tags

laravellaravel-packageauthorizationaclpermissionaccess control listlaravel-acllaravel-permissionlaravel-access-control-list

### Embed Badge

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

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

###  Alternatives

[santigarcor/laratrust

This package provides a flexible way to add Role-based Permissions to Laravel

2.3k5.4M43](/packages/santigarcor-laratrust)[casbin/laravel-authz

An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.

324339.9k4](/packages/casbin-laravel-authz)[imanghafoori/laravel-heyman

A package to help you write expressive defensive code in a functional manner

92537.1k5](/packages/imanghafoori-laravel-heyman)[efficiently/authority-controller

AuthorityController is an PHP authorization library for Laravel 5 which restricts what resources a given user is allowed to access.

15533.2k](/packages/efficiently-authority-controller)[hosseinhezami/laravel-permission-manager

Advanced permission manager for Laravel.

403.3k](/packages/hosseinhezami-laravel-permission-manager)[hasinhayder/tyro

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

6712.1k2](/packages/hasinhayder-tyro)

PHPackages © 2026

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