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

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

s00d/permissions
================

Laravel 5 package for handling user roles and permissions.

010PHP

Since Dec 4Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Permissions
===========

[](#permissions)

Tiny Laravel 5 package for handling user roles and permissions.

Installation
============

[](#installation)

Add the following to the require key of your composer.json file:

```
"s00d/permissions": "dev-master"

```

Run `$ composer update`.

Navigate to your `config/app.php` file and add `'s00d\Permissions\PermissionsServiceProvider'` to the `$providers` array.

Create the tables by running `$ php artisan migrate package="s00d/permissions"`. Ensure that your `users` table exists first.

Navigate to your `models/User.php` file and add the `s00d\Permissions\Can` trait below the class decloration line:

```
class User extends Eloquent implements UserInterface, RemindableInterface {
    use s00d\Permissions\Can;

```

Usage
=====

[](#usage)

Create a new role:

```
$role = new \s00d\Permissions\Role();
$role->name = 'Administrator';
$role->save();

```

Create a new permission:

```
$permission = new \s00d\Permissions\Permission();
$permission->name = 'read_articles';
$permission->display_name ='Can read articles';
$permission->save();

```

Attach the permission to the role:

```
$role->allow($permission);

```

Create a user:

```
$user = new User;
$user->role_id = 1;
$user->save();

```

And you're set! To check if a user has a permission:

```
$user = User::find(1);

if ($user->can('read_articles'))
    echo 'The user with the ID of "1" can read articles';

```

To check if the current authenticated user has a permission:

```
if (Auth::user()->can('read_articles'))
    echo 'The current authenticated user can read articles';

```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b58c344f6f895edc186de3097331fc96b852a970403edde4c9bbb50bd60388e6?d=identicon)[s00d](/maintainers/s00d)

---

Top Contributors

[![s00d](https://avatars.githubusercontent.com/u/2684895?v=4)](https://github.com/s00d "s00d (23 commits)")

### Embed Badge

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

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

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

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