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

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

ribafs/laravel-acl
==================

ACL Implementation to Applications in Laravel 8

v2.1(5y ago)74412MITBlade

Since Oct 1Pushed 2y ago3 watchersCompare

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

READMEChangelog (10)DependenciesVersions (50)Used By (0)

ACL implementation in Laravel 9 and 10
======================================

[](#acl-implementation-in-laravel-9-and-10)

Portuguese version this README
------------------------------

[](#portuguese-version-this-readme)

[README-PT](README-PT.md)

Support to laravel 9 and 10
---------------------------

[](#support-to-laravel-9-and-10)

Alto 8 versiom without try.

Using users, roles, permissions, trait, middleware, provider, etc

How to works?
-------------

[](#how-to-works)

User 'super' has access to all tables and can do everything in each one. User 'admin' only has access to the permissions, roles and users tables and can do everything with them. User 'manager' only has access to the customer table and can do everything with it. The 'user' user has access only to the clients' index view.

Log in with each user to try it out.

Tested with
-----------

[](#tested-with)

- Windows 7 and 10
- Linux Mint 20 and 21

News in version 2.0
-------------------

[](#news-in-version-20)

Now we have two areas, public and administrative. When entering the root of the application, you will be able to access the list of clients and the show. After login you will have rights according to the user.

Create a new app named 'acl' in laravel 9
-----------------------------------------

[](#create-a-new-app-named-acl-in-laravel-9)

If you have laravel installer, use:

```
laravel new acl --jet --teams --stack=livewire
cd acl
npm install && npm run dev
```

If not, for laravel 10:

composer create-project --prefer-dist laravel/laravel acl

For laravel 9:

```
composer create-project --prefer-dist laravel/laravel acl "9.5.2"

cd acl
composer require laravel/jetstream
php artisan jetstream:install livewire
npm install && npm run dev

```

### Create and configure the database

[](#create-and-configure-the-database)

nano .env

Install the laravel-acl
-----------------------

[](#install-the-laravel-acl)

```
composer require ribafs/laravel-acl
```

Publishe
--------

[](#publishe)

```
php artisan vendor:publish --provider="Ribafs\LaravelAcl\LaravelAclServiceProvider"
```

Copy some existing files
------------------------

[](#copy-some-existing-files)

- DatabaseSeeder.php
- routes/web.php
- views/welcome.blade.php
- views/layouts/app.blade.php

### Copy files

[](#copy-files)

```
php artisan copy:files
```

Now all package files are already in your application: migrations, seeders, Models, middleware, provider, etc

### Adjust app title (optional)

[](#adjust-app-title-optional)

Edit the .env and change the line with APP\_NAME, to something like: APP\_NAME='ACL to Laravel 9'

Try
---

[](#try)

After adding your CRUD, run and test the ACL on your application's access control.

```
php artisan migrate --seed
php artisan serve
localhost:8000/login
```

If you receive the error
------------------------

[](#if-you-receive-the-error)

```
Target class [Fruitcake\Cors\HandleCors] does not ...

```

Then edit

app/Http/Kernel.php

And comment out the line:

```
    //\Fruitcake\Cors\HandleCors::class,

```

Use to test:

-
- 123456

Then test with the others: admin, manager and user

Important
---------

[](#important)

This package is intended for new applications. Avoid using it in existing applications as it may overwrite some files.

Documentation in more detail
----------------------------

[](#documentation-in-more-detail)

The information above and much more information on how to get the most out of this package (English only for now):

How to creating a demo app with ribafs/laravel-acl
--------------------------------------------------

[](#how-to-creating-a-demo-app-with-ribafslaravel-acl)

Create a permission that no user has (example)

```
all-no

php artisan add:perm 'No perms' all-no
```

And assign to all views I don't want access to

```
@can('all-no')
```

On actions

```
    public function create(Request $request)
    {
        if ($request->user()->can('all-no')) {
            return view('admin.clients.create');
        }else{
            print 'Back to app';
            return 'Access denied in this demo';
        }
    }
```

Restrict actions to only those that have all-no permission, which no user has.

So you don't need to change the views.

Version for laravel 8 with existing apps
----------------------------------------

[](#version-for-laravel-8-with-existing-apps)

If you want a package to use with version 7 of laravel, click below:

Version for laravel 7
---------------------

[](#version-for-laravel-7)

If you want a package to use with version 7 of laravel, click below:

Version for laravel 6
---------------------

[](#version-for-laravel-6)

If you want a package to use with laravel version 6, click below:

Version for Laravel 5.8
-----------------------

[](#version-for-laravel-58)

If you want a package to use with laravel version 5.8, click below:

To quickly exchange ideas

License
-------

[](#license)

MIT

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

49

Last Release

2023d ago

Major Versions

v1.46 → 2.02020-10-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/2648037778408d15ac296ecb9eaaa00e45e01a77ff1f7e3f03a7d2d630356325?d=identicon)[ribafs](/maintainers/ribafs)

---

Top Contributors

[![ribafs](https://avatars.githubusercontent.com/u/855200?v=4)](https://github.com/ribafs "ribafs (153 commits)")

---

Tags

accessacllaravelpackagesecuritylaravelacl

### Embed Badge

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

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

###  Alternatives

[hasinhayder/tyro

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

6712.1k2](/packages/hasinhayder-tyro)[orchestra/auth

Auth Component for Orchestra Platform

24108.5k3](/packages/orchestra-auth)[codebot/entrust

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

1596.6k](/packages/codebot-entrust)

PHPackages © 2026

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