PHPackages                             mimaxuz/role-manager - 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. [Database &amp; ORM](/categories/database)
4. /
5. mimaxuz/role-manager

ActiveLibrary[Database &amp; ORM](/categories/database)

mimaxuz/role-manager
====================

Simple Laravel roles and permissions for Laravel applications

v3.0.5(1mo ago)2159MITPHPPHP ^8.1

Since Jun 20Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/MIMAXUZ/role-manager)[ Packagist](https://packagist.org/packages/mimaxuz/role-manager)[ Docs](https://github.com/MIMAXUZ/role-manager)[ RSS](/packages/mimaxuz-role-manager/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (4)Versions (18)Used By (0)

Simple Role Manager
===================

[](#simple-role-manager)

An easy and flexible Laravel authorization and roles permission management.

[![Total Downloads](https://camo.githubusercontent.com/46e3626907f2cbb2cfe21736ac53c334e38dfc6cc286d37a6324e6e261367322/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d696d6178757a2f726f6c652d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mimaxuz/role-manager)[![License](https://camo.githubusercontent.com/c99b1ffd58625b0b3a807412a8b865a4e9a04ac9e5ee580d410c40f16dccb381/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d696d6178757a2f726f6c652d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mimaxuz/role-manager)

About
-----

[](#about)

In many projects, you have to work with roles and permissions. Many packages are large and not all features are needed. That's why I tried to create a small but effective package for projects. This package can be attached to any project. Convenient and efficient. It is very easy to use and can be used after installation.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.0.2
- Laravel &gt;= 10.0

Installation
------------

[](#installation)

### Step 1: Install via Composer

[](#step-1-install-via-composer)

```
composer require mimaxuz/role-manager
```

### Step 2: Run Migrations

[](#step-2-run-migrations)

```
php artisan migrate
```

### Step 3: Publish Configuration (Optional)

[](#step-3-publish-configuration-optional)

```
php artisan vendor:publish --tag=role-manager-config
```

This will create a `config/role-manager.php` file where you can customize default roles, permissions, and other settings.

### Step 4: Add Trait to User Model

[](#step-4-add-trait-to-user-model)

Open your `App\Models\User` model and add the `HasPermissions` trait:

```
