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

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

programic/permissions
=====================

Target specific roles &amp; permissions

v2.0.1(4y ago)03.1kproprietaryPHPPHP ^7.2.5|^8.0

Since Jul 14Pushed 4y ago2 watchersCompare

[ Source](https://github.com/programic/permissions)[ Packagist](https://packagist.org/packages/programic/permissions)[ RSS](/packages/programic-permissions/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (6)Versions (13)Used By (0)

Programic - Roles &amp; Permissions
===================================

[](#programic---roles--permissions)

[![Latest Version on Packagist](https://camo.githubusercontent.com/14426a5230275d2d11812b55d1be31b7218093d2198e3547a2aa9987f5ca193d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70726f6772616d69632f7065726d697373696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/programic/laravel-permission)[![](https://github.com/programic/permissions/workflows/Run%20Tests/badge.svg?branch=master)](https://github.com/programic/permissions/workflows/Run%20Tests/badge.svg?branch=master)[![Total Downloads](https://camo.githubusercontent.com/3506255235a1eec1ce41230974e9e119ca251ab67d37279225474f535deaf56a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70726f6772616d69632f7065726d697373696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/programic/permissions)

This package allows you to manage target specific user permissions and roles in a database.

### Installation

[](#installation)

This package requires PHP 7.2 and Laravel 5.8 or higher.

```
composer require programic/permissions

```

### Setup

[](#setup)

Publish the config &amp; migration files

```
php artisan vendor:publish --provider="Programic\Permission\PermissionServiceProvider"

```

### Configuration

[](#configuration)

- Add the HasPermission &amp; HasRole trait to the User model

```
use Illuminate\Foundation\Auth\User as Authenticatable;
use Programic\Permission\Traits\HasPermissions;
use Programic\Permission\Traits\HasRole;

class User extends Authenticatable
{
    use HasPermissions;
    use HasRole;

    // ...
}
```

- Add the HasEntityPermissions trait to the Target model

```
use Illuminate\Database\Eloquent\Model;
use Programic\Permission\Traits\HasEntityPermissions;

class Article extends Model
{
    use HasEntityPermissions;

    // ...
}
```

### Basic Usage

[](#basic-usage)

```
// Assign global role to user
$user->assignRole('writer');

// Assign target specific role to user
$user->assignRole('writer', $model);

// Adding global permission to role
$role->givePermission('view-article');
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

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

Credits
-------

[](#credits)

- [Rick Bongers](https://github.com/rbongers)
- [Arjen Zwerver](https://github.com/arjenprogramic)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

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 ~35 days

Recently: every ~58 days

Total

12

Last Release

1740d ago

Major Versions

v1.4.4 → v2.0.02021-07-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/04de5632caf547d8dfa4ffbfac25d0538f92f1e9d52d2f91a2d1d6f17a9561a5?d=identicon)[Programic](/maintainers/Programic)

---

Top Contributors

[![rick-bongers](https://avatars.githubusercontent.com/u/67374906?v=4)](https://github.com/rick-bongers "rick-bongers (15 commits)")

---

Tags

laravelsecurityaclpermissionrolespermissionsrbacprogramic

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[wnikk/laravel-access-rules

Simple system of ACR (access control rules) for Laravel, with roles, groups, unlimited inheritance and possibility of multiplayer use.

103.6k1](/packages/wnikk-laravel-access-rules)[erag/laravel-role-permission

A simple and easy-to-install role and permission management package for Laravel, supporting versions 10.x and 11.x

404.2k](/packages/erag-laravel-role-permission)

PHPackages © 2026

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