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

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

rodrigopedra/laravel-simple-acl
===============================

Laravel Simple ACL

v1.2.0(9mo ago)16432MITPHPPHP ^8.1

Since Sep 17Pushed 9mo ago1 watchersCompare

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

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

Laravel Simple ACL
==================

[](#laravel-simple-acl)

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 9+

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

[](#installation)

```
{
    "require": {
        "rodrigopedra/laravel-simple-acl": "^1.0"
    }
}
```

- Export configuration and set the project's User model class name
    - default is: `App\Models\User`
- Add `\RodrigoPedra\LaravelSimpleACL\Concerns\HasACL` trait to the project's User model
- Run migrations
- Optionally load the included Middleware
    - This will load and cache a logged in user's roles and permissions and define a gate to each permission

Usage
-----

[](#usage)

Create roles and permissions through the included `RodrigoPedra\LaravelSimpleACL\Models\Role` and `RodrigoPedra\LaravelSimpleACL\Models\Permission` Eloquent models.

Permissions are meant to be grouped into a role, you can create a database seeder, or migration for your initial setup, for example:

```
$addUsers = Permission::create([
    'label' => 'add-users',
    'description' => 'User is allowed to create new users',
    'sort_index' => 1,
]);

$removeUsers = Permission::create([
    'label' => 'remove-users',
    'description' => 'User is allowed to remove users',
    'sort_index' => 2,
]);

Role::create([
    'label' => 'admin',
    'sort_index' => 1,
])->attachPermission($addUsers)->attachPermission($removeUsers);

Role::create([
    'label' => 'leader',
    'sort_index' => 2,
])->attachPermission($addUsers);
```

You can then add or remove roles to individual users using the included trait's helper methods:

```
$user->attachRole(Role::hasLabel('admin')->first());
$user->detachRole(Role::hasLabel('leader')->first());
```

If you add the `\RodrigoPedra\LaravelSimpleACL\Http\Middleware\LoadSimpleACL` middleware to your middleware stack, you can use Laravel's gate to check for permissions:

```
if ($user->can('add-users')) {
    // do something
}
```

Even on blade views

```
@can('add-users')
    {{-- do something --}}
@endcan
```

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance56

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 81% 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 ~318 days

Recently: every ~285 days

Total

10

Last Release

292d ago

Major Versions

v0.4.0 → v1.0.02024-02-25

PHP version history (3 changes)v0.1.0PHP &gt;=5.5.0

v0.4.0PHP ^7.2.5|^8.0

v1.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/28b79e134ef3cb5144da8f2c5af057533fcdf0afc1b7b083e8eafbbc8ee08a67?d=identicon)[rodrigo.pedra](/maintainers/rodrigo.pedra)

---

Top Contributors

[![rodrigopedra](https://avatars.githubusercontent.com/u/5470108?v=4)](https://github.com/rodrigopedra "rodrigopedra (17 commits)")[![juhniorsantos](https://avatars.githubusercontent.com/u/8250414?v=4)](https://github.com/juhniorsantos "juhniorsantos (4 commits)")

---

Tags

laravelacl

### Embed Badge

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

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

###  Alternatives

[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[casbin/laravel-authz

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

324339.9k4](/packages/casbin-laravel-authz)[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)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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