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

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

ghiffariaq/mini-acl
===================

Mini ACL

12.6k↓45.8%PHP

Since Mar 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Ghiffari/MiniACL)[ Packagist](https://packagist.org/packages/ghiffariaq/mini-acl)[ RSS](/packages/ghiffariaq-mini-acl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Mini ACL
========

[](#mini-acl)

[![Latest Version on Packagist](https://camo.githubusercontent.com/04779a88df4edb1f083fc043a43917a27326e39b27d90a84028ed4d55a7734c0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4d69716461647979792f72616a616f6e676b69726170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ghiffariaq/mini-acl)[![Total Downloads](https://camo.githubusercontent.com/291a79f857e8236e98a7f688bcc97413d06f7a1f473d9b22c2b381e28d86d70e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4d69716461647979792f72616a616f6e676b69726170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ghiffariaq/mini-acl)

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

[](#installation)

Via Composer

```
$ composer require ghiffariaq/mini-acl
```

After finish installing using composer

1. Publish configuration file to specified your model namespace:

    ```
    php artisan vendor:publish

    ```
2. See config/miniacl.php, by default it has value App\\User, you can change it if you have different namespace.
3. Run migrations

    ```
    php artisan migrate

    ```
4. Add MiniACL's trait to your user model:

    ```
    use Ghiffariaq\MiniACL\Traits\HasRoles;

    class User extends Model
    {
        use HasRoles;
    }
    ```

Console Usage
-------------

[](#console-usage)

We have prepare simple example to assign any roles to specific user id by using this artisan command.

```
php artisan assign:role {name} {user_id}

```

Usage
-----

[](#usage)

### Assign Role to user

[](#assign-role-to-user)

```
$user = User::findOrFail($id);
$user->assign('role_name');

```

### Remove Role from user

[](#remove-role-from-user)

```
$user = User::findOrFail($id);
$user->retract('role_name');

```

### Retrieve All Roles

[](#retrieve-all-roles)

```
$user = User::findOrFail($id);
$user->roles;

```

### Check Whether user is a specific role

[](#check-whether-user-is-a-specific-role)

```
$user = User::findOrFail($id);
$user->isA('role_name');

```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Ghiffari Assamar Qandi](https://github.com/Ghiffari)
- [All Contributors](../../contributors)

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1dbde8d1b0cd26e8b471703f641f4cf3fbeacff9b800e84be90a28113eab0b87?d=identicon)[ghiffariaq](/maintainers/ghiffariaq)

---

Top Contributors

[![Ghiffari](https://avatars.githubusercontent.com/u/14313342?v=4)](https://github.com/Ghiffari "Ghiffari (11 commits)")

### Embed Badge

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

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M117](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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