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

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

mrterryh/permissions
====================

Tiny Laravel 4 package for handling user roles and permissions.

56939PHP

Since Feb 1Pushed 9y ago3 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

IMPORTANT!
==========

[](#important)

> This package is outdated and no longer maintained. I plan on bringing it back up to date eventually, but until then there are plenty of decent alternatives.

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

[](#permissions)

Tiny Laravel 4 package for handling user roles and permissions.

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

[](#installation)

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

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

```

Run `$ composer update`.

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

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

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

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

```

Usage
=====

[](#usage)

Create a new role:

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

```

Create a new permission:

```
$permission = new \Mrterryh\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';

```

License
=======

[](#license)

Permissions is licensed under the [MIT license](http://opensource.org/licenses/MIT).

Thank you!
==========

[](#thank-you)

Thank you for using my package. Should you encouter any problems, please submit them [here](https://github.com/mrterryh/Permissions/issues) and they shall be dealt with promptly.

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community12

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/6ffdd47503f5111c43de3e2ed236cf93974949df49e79418400074476ce99e42?d=identicon)[mrterryh](/maintainers/mrterryh)

---

Top Contributors

[![mrterryh](https://avatars.githubusercontent.com/u/4132491?v=4)](https://github.com/mrterryh "mrterryh (8 commits)")

### Embed Badge

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

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

###  Alternatives

[tg/tgwebvalid

An easy way to validate Telegram Login Widget and Telegram Mini App users on your website using PHP

6827.5k1](/packages/tg-tgwebvalid)[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)[kissdigital-com/apple-sign-in-client-secret-generator

PHP package for generating 'client secret' for Sign In with Apple

2125.5k](/packages/kissdigital-com-apple-sign-in-client-secret-generator)[denniseilander/laravel-passport-scopes-restriction

Restrict scopes for different Laravel Passport clients.

1636.3k](/packages/denniseilander-laravel-passport-scopes-restriction)

PHPackages © 2026

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