PHPackages                             atif/laravel-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. atif/laravel-role-manager

ActiveLibrary

atif/laravel-role-manager
=========================

A Laravel package for managing roles and permissions with full CRUD and UI.

v1.0.0(2mo ago)06MITBladePHP ^8.2

Since Feb 28Pushed 2mo agoCompare

[ Source](https://github.com/mohammadatif786/rolemanager)[ Packagist](https://packagist.org/packages/atif/laravel-role-manager)[ RSS](/packages/atif-laravel-role-manager/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Role &amp; Permission Manager
=====================================

[](#laravel-role--permission-manager)

A premium, production-ready Laravel package for managing roles and permissions with a beautiful Tailwind CSS &amp; Alpine.js powered UI. Built on top of the industry-standard `spatie/laravel-permission` package.

[![Package UI](https://raw.githubusercontent.com/mohammadatif786/rolemanager/main/screenshot.png)](https://raw.githubusercontent.com/mohammadatif786/rolemanager/main/screenshot.png) *(Optional: Add your screenshot here)*

Features
--------

[](#features)

- **Professional UI**: Built with advanced Tailwind CSS (glassmorphism, transitions) and Alpine.js.
- **Modal-Based Workflow**: Create and edit roles/permissions without page reloads.
- **Real-time Feedback**: Global toast notifications for CRUD operations.
- **Service Layer Architecture**: Clean, maintainable code following Laravel best practices.
- **Advanced Role Assignment**: Easily assign multiple permissions to roles directly from the UI.
- **Form Request Validation**: Robust backend validation for all inputs.

Prerequisites
-------------

[](#prerequisites)

- PHP ^8.2
- Laravel ^10.0 or ^11.0 or ^12.0
- Tailwind CSS (for the UI to render correctly)
- Alpine.js (for modals and toasts)

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

[](#installation)

### 1. Install the Package

[](#1-install-the-package)

Install the package via composer:

```
composer require atif/laravel-role-manager
```

### 2. Publish Assets

[](#2-publish-assets)

Publish the configuration, migrations, and views:

```
php artisan vendor:publish --provider="Atif\RoleManager\RoleManagerServiceProvider"
```

### 3. Run Migrations

[](#3-run-migrations)

Run the migrations to create the necessary tables:

```
php artisan migrate
```

Setup
-----

[](#setup)

### 1. Add the Trait to your User Model

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

Include the `HasRoles` trait in your `App\Models\User` model:

```
use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable
{
    use HasRoles;
    // ...
}
```

### 2. Configure Tailwind CSS

[](#2-configure-tailwind-css)

Ensure your `tailwind.config.js` includes the package views so the styles are generated:

```
/** @type {import('tailwindcss').Config} */
export default {
  content: [
    "./resources/**/*.blade.php",
    "./resources/**/*.js",
    "./resources/**/*.vue",
    "./vendor/atif/laravel-role-manager/resources/views/**/*.blade.php", // Add this line
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}
```

Usage
-----

[](#usage)

### Accessing the Dashboard

[](#accessing-the-dashboard)

Once installed, you can access the management interface at:

- **Roles**: `/roles`
- **Permissions**: `/permissions`

### Middleware Protection

[](#middleware-protection)

By default, the routes are open. You should protect them in your `App\Providers\RouteServiceProvider` or by wrapping them in your own route group with middleware:

```
Route::middleware(['auth', 'role:admin'])->group(function () {
    // Your role/permission routes are already registered,
    // but you can control access via Spatie's middleware.
});
```

Configuration
-------------

[](#configuration)

You can customize the package behavior in `config/RoleManager.php`:

- `layout`: The base layout your views should extend (default: `layouts.app`).
- `middleware`: Global middleware for the package routes.
- `prefix`: URL prefix for the routes.

Credits
-------

[](#credits)

- **Author**: [Mohammad Atif](mailto:mohammadatif24680@gmail.com)
- **Built with**: [Spatie Laravel Permission](https://github.com/spatie/laravel-permission)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance86

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

73d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1857a97dcd6a9a8b26b8e5ea5d9a472283b5f3a5a9c777d6251b3c0df8856d9e?d=identicon)[mohammadatif786](/maintainers/mohammadatif786)

---

Top Contributors

[![mohammadatif786](https://avatars.githubusercontent.com/u/141517175?v=4)](https://github.com/mohammadatif786 "mohammadatif786 (2 commits)")

### Embed Badge

![Health badge](/badges/atif-laravel-role-manager/health.svg)

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

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[althinect/filament-spatie-roles-permissions

340954.7k9](/packages/althinect-filament-spatie-roles-permissions)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1225.0k10](/packages/fleetbase-core-api)

PHPackages © 2026

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