PHPackages                             heymowski/laravel-roles-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. heymowski/laravel-roles-permissions

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

heymowski/laravel-roles-permissions
===================================

Laravel Roles &amp; Permission

0.1(9y ago)053MITHTMLPHP &gt;=5.4.0

Since Dec 5Pushed 9y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (2)Used By (0)

Laravel Roles &amp; Permission
==============================

[](#laravel-roles--permission)

Another Laravel package to manage Roles and Permissions

Based on what I have learned in Laracast

Thanks to Jeffrey Way

> **Note:**

> - Tested on Laravel Framework version 5.3.26 .
> - The system uses the default Laravel User model.
> - You need a database connection.

---

Steps
-----

[](#steps)

### 1. Require with composer

[](#1-require-with-composer)

```
composer require heymowski/laravel-roles-permissions

```

### 2. Add ServiceProvider

[](#2-add-serviceprovider)

```
/*
 * Package Service Providers...
 */
 Heymowski\RolesAndPermissions\RolesAndPermissionsServiceProvider::class,

```

### 3. Publish package files

[](#3-publish-package-files)

```
php artisan vendor:publish

```

```
Copied Files:
- Config File: /config/RolesAndPermissions.php
- Migrations:
	2016_11_28_123904_create_roles_table
	2016_11_28_124218_create_permissions_table
	2016_11_28_124701_create_permission_role_table
	2016_11_28_125042_create_role_user_table
- Seeds (Some roles and permissions):
	RoleSeeder.php
	PermissionSeeder.php

```

### 4. Migrate Tables

[](#4-migrate-tables)

```
php artisan migrate

```

### 5. Add trait to your User model

[](#5-add-trait-to-your-user-model)

```

namespace App;

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;

use Heymowski\RolesAndPermissions\Traits\HasRoles;

class User extends Authenticatable
{
    use Notifiable, HasRoles;

```

### 6. Test System

[](#6-test-system)

```
To test the system you have to be logged in
http://localhost:8000/rolesandpermissions/role

```

### 7. Add rules to your Blades or Controllers

[](#7-add-rules-to-your-blades-or-controllers)

```
@can('permission_name')

	The Current User Can ...

@endcan

```

---

```
@cannot('permission_name')

	The Current User Can't ...

@endcannot

```

---

```
if (Gate::allows('permission_name')) {

	The current user can ...

}

```

---

```
if (Gate::denies('permission_name')) {

	The current user can't ...

}

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

3494d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10332700?v=4)[Juan José Juan Heymowski](/maintainers/heymowski)[@heymowski](https://github.com/heymowski)

---

Top Contributors

[![heymowski](https://avatars.githubusercontent.com/u/10332700?v=4)](https://github.com/heymowski "heymowski (7 commits)")

---

Tags

laravelrolespermissions

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/heymowski-laravel-roles-permissions/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k3.5M118](/packages/bezhansalleh-filament-shield)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6783.6k5](/packages/hasinhayder-tyro)[shanmuga/laravel-entrust

This package provides a flexible solution to add ACL to Laravel

69329.8k2](/packages/shanmuga-laravel-entrust)[beatswitch/lock-laravel

A Laravel Driver for Lock.

15429.6k1](/packages/beatswitch-lock-laravel)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)

PHPackages © 2026

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