PHPackages                             koterle/roleable - 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. koterle/roleable

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

koterle/roleable
================

Simple role management and authorization library for Laravel.

1.1.0(10y ago)339MITPHPPHP &gt;=5.5.9

Since Sep 30Pushed 10y ago3 watchersCompare

[ Source](https://github.com/martink635/Roleable)[ Packagist](https://packagist.org/packages/koterle/roleable)[ RSS](/packages/koterle-roleable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (8)Used By (0)

Roleable
========

[](#roleable)

Simple role management for Laravel by Model class and ID for Laravel 5.1

For Laravel 5.0 use the 1.0 branch. For laravel 4 use the 0.9 branch.

Install
-------

[](#install)

Via Composer

```
{
    "require": {
        "koterle/roleable": "1.1.*"
    }
}
```

Update Composer:

```
composer update --dev

```

Once it completes, add the service provideer in your `config/app.php`.

```
Koterle\Roleable\RoleableServiceProvider::class

```

Usage
-----

[](#usage)

Publish the config file and the migrations. Make sure you set your User model and User ID type correctly.

```
php artisan vendor:publish
```

Run the migrations.

```
php artisan migrate
```

Add the CanTrait to the User model:

```
use CanTrait;
```

Fill up the database with the desired roles and permissions.

Now you can use (role name/permission, class, id):

```
if (Auth::user()->is('administrator', 'Company', 1)) { ... }
if (Auth::user()->can('manage_users', 'Company', 1)) { ... }
if (Auth::user()->cannot('delete_posts', 'Blog', 1)) { ... }

Auth::user()->attachRole('administrator', 'Company', 1);
Auth::user()->detachRole('administrator', 'Company', 1);
```

License
-------

[](#license)

The MIT License (MIT)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

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

Recently: every ~69 days

Total

6

Last Release

3946d ago

Major Versions

0.9.0 → 1.0.22015-01-08

0.9.1 → 1.1.02015-07-21

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

1.1.0PHP &gt;=5.5.9

### Community

Maintainers

![](https://www.gravatar.com/avatar/098fbc2d5ad485828687bfa4ae8c00dc4296cc465e9e57f7382644593a3759d8?d=identicon)[koterle](/maintainers/koterle)

---

Top Contributors

[![martink635](https://avatars.githubusercontent.com/u/444687?v=4)](https://github.com/martink635 "martink635 (22 commits)")

---

Tags

laravelauthorizationroles

### Embed Badge

![Health badge](/badges/koterle-roleable/health.svg)

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

###  Alternatives

[shanmuga/laravel-entrust

This package provides a flexible solution to add ACL to Laravel

68312.9k2](/packages/shanmuga-laravel-entrust)[hasinhayder/tyro

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

6712.1k2](/packages/hasinhayder-tyro)[hosseinhezami/laravel-permission-manager

Advanced permission manager for Laravel.

403.3k](/packages/hosseinhezami-laravel-permission-manager)[amdadulhaq/guard-laravel

Guard is Role and Permission management system for Laravel

134.4k](/packages/amdadulhaq-guard-laravel)

PHPackages © 2026

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