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.

53939PHP

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 3d ago

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 43% 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

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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