PHPackages                             tuvaergun/permission - 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. tuvaergun/permission

ActiveLibrary

tuvaergun/permission
====================

Light-weight role-based permissions for Laravel 5 built in Auth system.

18PHP

Since Oct 5Pushed 10y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

tuvaergunrgun/permission
========================

[](#tuvaergunrgunpermission)

Laravel Permission adds role based permissions to built in Auth System of Laravel 5. Permission middleware protects routes and even crud controller methods.

Table of Contents
=================

[](#table-of-contents)

- [Requirements](#requirements)
- [Getting Started](#getting-started)
- [Documentation](#documentation)
- [Roadmap](#roadmap)
- [Change Logs](#change-logs)
- [Contribution Guidelines](#contribution-guidelines)

Requirements
====================================================

[](#requirements)

- This package requires PHP 5.4+

Getting Started
==========================================================

[](#getting-started)

1. Require the package in your `composer.json` and update your dependency with `composer update`:

```
"require": {
...
"tuvaergun/permission": "~1.0@dev",
...
},

```

2. Add the package to your application service providers in `config/app.php`.

```
'providers' => [

'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Auth\AuthServiceProvider',
...
'Tuva\Permission\PermissionServiceProvider',

],
```

3. Publish the package migrations to your application and run these with `php artisan migrate.

```
$ php artisan vendor:publish --provider="Tuva\Permission\PermissionServiceProvider"

```

> **Use your own models.**Once you publish, it publishes the configuration file where you can define your own models which should extend to Permission models.

4. Add the middleware to your `app/Http/Kernel.php`.

```
protected $routeMiddleware = [

....
'permission' => 'Tuva\Permission\Middleware\HasPermission',

];
```

5. Add the HasRole trait to your `User` model.

```
use Tuva\Permission\Traits\HasRole;

class User extends Model implements AuthenticatableContract, CanResetPasswordContract
{
use Authenticatable, CanResetPassword, HasRole;
}
```

Documentation
======================================================

[](#documentation)

Follow along the [Wiki](https://github.com/tuvaergun/permission/wiki) to find out more.

Roadmap
==========================================

[](#roadmap)

Here's the TODO list for the next release (**2.0**).

- Refactoring the source code.
- Correct all issues.
- Adding cache to final user permissions.
- Adding tests.

Change Logs
==================================================

[](#change-logs)

**June 14, 2015 (latest)**

- Added backward compatibility to l5.0 for lists() method.
- Added [Blade Template Extensions](https://github.com/tuvaergun/permission/wiki/Blade-Extensions).

*March 28, 2015*

- Added Role Scope to get all users having a specific role. e.g `User::role('admin')->get();` will list all users having `admin` role.

*March 7, 2015*

- `is()` and `can()` methods now support comma for `AND` and pipe as `OR` operator. Or pass an operator as a second param. [more information](https://github.com/tuvaergun/permission/wiki/Validate-Permissions-and-Roles)
- You can bind multiple permissions together so they inherit ones permission. [more information](https://github.com/tuvaergun/permission/wiki/Permissions-Inheritance)

Contribution Guidelines
==========================================================================

[](#contribution-guidelines)

Support follows PSR-2 PHP coding standards, and semantic versioning.

Please report any issue you find in the issues page. Pull requests are welcome.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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/c135d993ddf0edd80eb3e615ca8ee16921c48edd624f674412a482655003f67c?d=identicon)[tuvaergun](/maintainers/tuvaergun)

### Embed Badge

![Health badge](/badges/tuvaergun-permission/health.svg)

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

PHPackages © 2026

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