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

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

cyrixbiz/acl
============

An Access Control List for Laravel without Gates

1.0(7y ago)025PHPPHP &gt;= 7.1

Since Feb 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/cryptncyrix/acl)[ Packagist](https://packagist.org/packages/cyrixbiz/acl)[ RSS](/packages/cyrixbiz-acl/feed)WikiDiscussions master Synced today

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

An Access Control List for Laravel
==================================

[](#an-access-control-list-for-laravel)

> With this ACL is it possible to protect routes as well as single methods / functions It's possible to give Single authorizations to users or to divide into roles which can also get single authorizations.

### Install the ACL

[](#install-the-acl)

- Composer

    ```
    composer require cyrixbiz/acl dev-master
    ```
- Edit config\\app and add the following lines

    ```
    'providers' => [
    // ...
    cyrixbiz\acl\AclServiceProvider::class,
    // ...
    ];
    ```
- Got to your User Model - Default Value: App\\Models\\User.php and set this

    ```
    //after namespace .....
    use cyrixbiz\acl\traits\hasRelation;

    //after Notifiable in Class
    //for Example: use Notifiable, hasRelation;

    , hasRelation;
    ```
- Install all

    ```
    php artisan make:acl
    ```
- Install a Single Method

    - Allow Arguments:

        - setAuth ( Laravel Auth )
        - setRoutes ( ACL Routes to web.php )
        - setResourceFiles ( Lang and View Files)
        - setTables ( Set Database Tables )
        - setSeeds ( Insert Database Seeds)
        - setAdmin ( Set an Admin )
    - Allow Options

        - setAdmin --admin=Adminname --admin=AdminMail --admin=AdminPassword

            > Rules = Name 5 Letters Email Valid-Email and Unique Password = Min. 8 Signs and 3 of 4 Rules 1 Low- and 1 Upper- Case / 1 Number / Special Chars

    ```
    php artisan make:acl argument
    ```
- Edit App\\Http\\Kernel and add the following lines

    ```
    protected $middlewareGroups = [
      //
    'acl' => [\cyrixbiz\acl\Http\Middleware\Acl::class,
            ],
    ```
- Error - Handling

    > Exception: PDOException::("SQLSTATE\[42000\]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes")

    Fix this Issue:

    - App\\Providers

    ```
    // after namespace
    use Illuminate\Support\Facades\Schema;
    // Inside Boot-Method
    Schema::defaultStringLength(191);
    ```

### Config - File

[](#config---file)

- ACL

    - Enable / Disable the Routeprotection

        ###### 'enable' =&gt; true | false

        [](#enable--true--false)
    - Method to check the Routes

        ###### 'method' =&gt; getActionName | getName

        [](#method--getactionname--getname)

        > Description: If i use the method 'getActionName', the controller will be used and dissolved for the determination of the resources. Out of the rolecontroller@index it will create role.index. If u use the method 'getName', the alias of the controller will be used for the determination.

        ###### 'fallback' =&gt; getActionName | getName

        [](#fallback--getactionname--getname)

        > Description: Set a Fallback to Check the Method
    - Set a Secure User

        ###### 'superAdmin' =&gt; 1 - UserID

        [](#superadmin--1---userid)

        > Description: This User has Full Rights and can't be deleted
    - Set a newMemberRole

        ###### 'newMemberRole' =&gt; 3 - UserID

        [](#newmemberrole--3---userid)

        > Description: Members receive this Role after an active registration
    - Set a Blocked Role

        ###### 'blockedRole' =&gt; 5 - RoleID

        [](#blockedrole--5---roleid)

        > Description: This Role has zero Rights and can't be deleted. Set a User to this Role and all other Roles and Resources will be deleted.
- Cache

    - Set Cache Time in Seconds ###### 'time' =&gt; '60'

        [](#time--60)

        > Description: This Method set the Time to Cache the User-Resources

### Usage

[](#usage)

###### Middleware

[](#middleware)

> For Example: Set this to your Route-File and all routes in this group are checked
>
> - routes/web

```
Route::middleware(['web' , 'acl'])
    ->group(function () {
        Route::get('user', 'cyrixbiz\acl\controller\UserController@index')
            ->name('user.index');
});
```

###### Blade

[](#blade)

> For Example: Single Check @perm @endperm

```
@perm('user.index')
    Anzeigen
@endperm
```

> For Example: Multi Check @perms @endperms

```
@perms(['acl.getPermissions' , 'role.user'])
Anker
@endperms
```

> For Example: Multi Check, One must true @orPerms @endorPerms

```
@orPerms(['acl.getPermissions' , 'role.user'])
Anker
@endorPerms
```

###### Requirements

[](#requirements)

- [Laravel 8.x](https://laravel.com/docs/8.x/)
- [Auth](https://laravel.com/docs/8.x/authentication)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity56

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

Every ~57 days

Total

2

Last Release

2592d ago

Major Versions

0.1 → 1.02019-04-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/66f7bfeffa779179a41b32620189287937b1a13b53a46158cc175ffff84ee550?d=identicon)[cryptncyrix](/maintainers/cryptncyrix)

### Embed Badge

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

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

###  Alternatives

[regulus/identify

A Laravel 5 authentication/authorization package that adds roles, permissions, access levels, and user states. Allows simple or complex user access control implementation.

174.7k1](/packages/regulus-identify)

PHPackages © 2026

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