PHPackages                             logobinder/roles - 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. logobinder/roles

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

logobinder/roles
================

Simplest Roles

v0.0.4(9y ago)025MITPHP

Since Aug 4Pushed 9y agoCompare

[ Source](https://github.com/logobinder/roles)[ Packagist](https://packagist.org/packages/logobinder/roles)[ Docs](https://github.com/logobinder/roles)[ RSS](/packages/logobinder-roles/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)DependenciesVersions (5)Used By (0)

roles
=====

[](#roles)

Simple add trait to user model to use roles. Contains role middleware.

Instalation:
============

[](#instalation)

add to "\\config\\app.php":
---------------------------

[](#add-to-configappphp)

```
'providers' => [
    ...
    Logobinder\Roles\RolesServiceProvider::class,
    ...
],

```

add to "\\app\\User.php":
-------------------------

[](#add-to-appuserphp)

```
...
use \Logobinder\Roles\RolesTrait;
...

```

Usage
=====

[](#usage)

In route:
---------

[](#in-route)

```
Route::group(['namespace' => 'Admin', 'middleware' => ['web', 'auth','role:admin'], 'prefix' => 'admin'], function () {
    Route::resource('some', 'SomeController');
});

```

In seeder:
----------

[](#in-seeder)

```
    $role = Logobinder\Roles\Role::create(['name' => 'admin']);

    $user = \App\User::create([
                'name' => 'Administrator',
                'email' => 'a.anyszek@gmail.com',
                'password' => bcrypt('adminadmin'),
    ]);

    $user->roles()->attach($role);

```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

Total

4

Last Release

3618d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/38db13ec033284db133747d2bdefbb09638d361d2fe7e65e0dc963bc85443ea3?d=identicon)[logobinder](/maintainers/logobinder)

---

Top Contributors

[![aanyszek](https://avatars.githubusercontent.com/u/20854683?v=4)](https://github.com/aanyszek "aanyszek (6 commits)")

---

Tags

laravelSimplerole

### Embed Badge

![Health badge](/badges/logobinder-roles/health.svg)

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

###  Alternatives

[sereny/nova-permissions

Laravel Nova - Roles &amp; Permissions

87455.9k1](/packages/sereny-nova-permissions)[efficiently/authority-controller

AuthorityController is an PHP authorization library for Laravel 5 which restricts what resources a given user is allowed to access.

15433.2k](/packages/efficiently-authority-controller)[klaravel/ntrust

Role-Based Permissions for Laravel 5.3+

10026.8k1](/packages/klaravel-ntrust)[jotaelesalinas/laravel-adminless-ldap-auth

Authenticate users in Laravel against an adminless LDAP server

2075.2k](/packages/jotaelesalinas-laravel-adminless-ldap-auth)[cgross/laraguard

Permissions/roles for Laravel 5

388.9k](/packages/cgross-laraguard)

PHPackages © 2026

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