PHPackages                             harigokhe/dexbytes-laravel-role - 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. harigokhe/dexbytes-laravel-role

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

harigokhe/dexbytes-laravel-role
===============================

user role management

018PHP

Since Aug 13Pushed 7y agoCompare

[ Source](https://github.com/harigokhe/dexbytes-laravel-role)[ Packagist](https://packagist.org/packages/harigokhe/dexbytes-laravel-role)[ RSS](/packages/harigokhe-dexbytes-laravel-role/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

package folder structure

```
│   composer.json
│   readme.md
│
├───config
│       roles.php
│
├───migrations
│       2016_01_15_105324_create_roles_table.php
│       2016_01_15_114412_create_role_user_table.php
│       2016_01_26_115212_create_permissions_table.php
│       2016_01_26_115523_create_permission_role_table.php
│       2016_02_09_132439_create_permission_user_table.php
│
├───seeds
│       ConnectRelationshipsSeeder.php
│       PermissionsTableSeeder.php
│       RolesTableSeeder.php
│       UsersTableSeeder.php
│
└───src
	│   LaravelRoleServiceProvider.php
	│
	├───Exceptions
	│       AccessDeniedException.php
	│       LevelDeniedException.php
	│       PermissionDeniedException.php
	│       RoleDeniedException.php
	│
	├───Interfaces
	│       HasRoleAndPermission.php
	│       PermissionHasRelations.php
	│       RoleHasRelations.php
	│
	├───Models
	│       Permission.php
	│       Role.php
	│
	└───Traits
			HasRoleAndPermission.php
			PermissionHasRelations.php
			RoleHasRelations.php
			Slugable.php

```

Package Installation

1. Add "harigokhe/dexbytes-laravel-role": "dev-master" in require json in composer file
2. Update composer

    composer update
3. Add service provider in config/app.php in provider array

    harigokhe\\LaravelRoles\\LaravelRoleServiceProvider::class
4. Publish your package file

    php artisan vendor:publish --provider="harigokhe\\LaravelRoles\\LaravelRoleServiceProvider"
5. php artisan migrate
6. Add class in user model

    Before class- use harigokhe\\LaravelRoles\\Traits\\HasRoleAndPermission;

    After class- use HasRoleAndPermission;
7. Open file database/seeds/DatabaseSeeder.php

    Add these line inside run method

    $this-&gt;call(PermissionsTableSeeder::class); $this-&gt;call(RolesTableSeeder::class); $this-&gt;call(UsersTableSeeder::class); $this-&gt;call(ConnectRelationshipsSeeder::class);
8. Run command composer dumpautoload
9. Run command for admin/user role

    php artisan db:seed

Seed an initial set of Permissions, Roles, and Users with roles.

#### Roles Seeded

[](#roles-seeded)

PropertyValueNameAdminSlugadminDescriptionAdmin RoleLevel2PropertyValueNameUserSluguserDescriptionUser RoleLevel1PropertyValueNameUnverifiedSlugunverifiedDescriptionUnverified RoleLevel0#### Permissions Seeded:

[](#permissions-seeded)

PropertyValuenameCan View Usersslugview.usersdescriptionCan view usersmodelPermissionPropertyValuenameCan Create Usersslugcreate.usersdescriptionCan create new usersmodelPermissionPropertyValuenameCan Edit Usersslugedit.usersdescriptionCan edit usersmodelPermissionPropertyValuenameCan Delete Usersslugdelete.usersdescriptionCan delete usersmodelPermission

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60.7% 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/b2017614a201683b509c6fd6c23ffa09c8c6cc60ce4b30d65e2f3b77e7baa36e?d=identicon)[harigokhe](/maintainers/harigokhe)

---

Top Contributors

[![candodexbytes](https://avatars.githubusercontent.com/u/36655834?v=4)](https://github.com/candodexbytes "candodexbytes (17 commits)")[![harigokhe](https://avatars.githubusercontent.com/u/42240006?v=4)](https://github.com/harigokhe "harigokhe (11 commits)")

---

Tags

laravel-permissionslaravel-roleslaravel-roles-permissionsroles-managementuser-levels

### Embed Badge

![Health badge](/badges/harigokhe-dexbytes-laravel-role/health.svg)

```
[![Health](https://phpackages.com/badges/harigokhe-dexbytes-laravel-role/health.svg)](https://phpackages.com/packages/harigokhe-dexbytes-laravel-role)
```

###  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)
