PHPackages                             d1360l/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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. d1360l/laravel-role-manager

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

d1360l/laravel-role-manager
===========================

A Laravel package to manage the relationships between users and Spatie roles, with a permission-driven UI, configurable default role, and webmaster provisioning. Built by El Flaco Programa (EFP).

v1.0.1(1mo ago)03MITPHPPHP ^8.3

Since Jul 11Pushed 1mo agoCompare

[ Source](https://github.com/D1360L/laravel-role-manager)[ Packagist](https://packagist.org/packages/d1360l/laravel-role-manager)[ Docs](https://github.com/D1360L/laravel-role-manager)[ RSS](/packages/d1360l-laravel-role-manager/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

EFP Role Manager
================

[](#efp-role-manager)

A Laravel package to manage the relationship between users and [Spatie roles](https://github.com/spatie/laravel-permission), with a permission-driven UI, a configurable default role for new users, and webmaster provisioning. Built by **El Flaco Programa (EFP)**.

Features
--------

[](#features)

- **User ↔ role management UI**: list users, search by email (prefix match), filter by role, and update a user's roles.
- **Permission-driven authorization**: every action is authorized through policies that check *permissions* (never roles directly).
- **Role hierarchy**: `webmaster &gt; chief &gt; staff &gt; \[unknown roles\] &gt; registered > (no role)`. Users only see and manage users ranked below them.
- **Webmaster peers**: optionally allow webmasters to manage other webmasters.
- **Default role for new users**: automatically assign a configurable role on registration (toggleable from the UI).
- **Bilingual UI**: English and Spanish, switchable from the settings page.
- **Self-contained, responsive views** styled with Tailwind CSS.

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

[](#requirements)

Before installing the package, ensure your application meets the following prerequisites:

- **PHP** `^8.3`
- **Laravel** `^13.0`
- **[spatie/laravel-permission](https://github.com/spatie/laravel-permission)** `^8.3` (installed and migrated)
- **Laravel Breeze** installed in the consuming application (provides the `users` table and authentication scaffolding).
- Your `User` model must use Spatie's `HasRoles` trait.

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

[](#installation)

For detailed prerequisites, manual asset publishing, configuration options, and frontend customizations, please refer to our comprehensive **[Installation Guide](docs/installation.md)**.

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

[](#configuration)

The published config file (`config/efp-role-manager.php`) lets you set:

- `user_model` — the application's user model (auto-resolved by default).
- `routing` — the URL prefix, route-name prefix, and middleware stack.
- `layout` — the Blade layout component used by the module views.
- `roles` / `permissions` — the role and permission **names** (renamable).
- `webmaster.emails` — the email(s) provisioned as webmaster on install.
- `webmaster.can_manage_peers` — allow webmasters to manage other webmasters.
- `default_role` — factory default for the new-user default role.
- `localization` — available locales and the default/fallback locale.
- `pagination.per_page` — users shown per page in the listing.

> **Settings precedence:** runtime settings live in the database and take priority over the config file (`DATABASE > CONFIG`). The config values are the factory defaults; `efp-role-manager:install` seeds them into the database.

Usage
-----

[](#usage)

Once installed, visit the module (default: `/efp-role-manager/users`) as a user who holds one of the management permissions:

RoleCan managewebmasterchiefs, staff, users, settingschiefstaff, usersstaffusersregistered— (default role, no management)Rules enforced by the policies:

- **No self-editing**: nobody can change their own roles.
- **Hierarchy**: you can only manage users ranked *below* you.
- **Webmaster peers**: only webmasters can manage same-level peers, and only when `webmaster.can_manage_peers` is enabled.

Commands
--------

[](#commands)

CommandDescription`efp-role-manager:install`Create roles/permissions, assign webmaster(s), seed settings. Safe to re-run (idempotent); never overwrites existing settings.`efp-role-manager:sync`Overwrite the settings from the config defaults (explicit re-seed). Only touches settings.Default role for new users
--------------------------

[](#default-role-for-new-users)

When enabled, users are assigned the configured default role upon registration (via Laravel's `Registered` event). The webmaster role can never be used as the default role. The feature and the role name are managed from the settings page.

Localization
------------

[](#localization)

The UI ships in English (default) and Spanish, switchable from the settings page. A middleware applies the selected locale on the module's routes only, so the rest of your application's locale is unaffected.

Upgrading &amp; Uninstalling
----------------------------

[](#upgrading--uninstalling)

- [docs/upgrade.md](docs/upgrade.md)
- [docs/uninstallation.md](docs/uninstallation.md)

License
-------

[](#license)

The MIT License (MIT). Built by El Flaco Programa (EFP).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance90

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

Every ~0 days

Total

2

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/44896cfbeac9ba07b8a65fec5291813634885bb6851f3bc36ee06ff280437427?d=identicon)[D1360L](/maintainers/D1360L)

---

Top Contributors

[![D1360L](https://avatars.githubusercontent.com/u/68708069?v=4)](https://github.com/D1360L "D1360L (6 commits)")

---

Tags

spatielaravelrolespermissionsuser-rolesrole-managerefp

### Embed Badge

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

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

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M342](/packages/laravel-ai)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k4.3M166](/packages/bezhansalleh-filament-shield)[spatie/laravel-health

Monitor the health of a Laravel application

88412.7M191](/packages/spatie-laravel-health)[althinect/filament-spatie-roles-permissions

3491.2M12](/packages/althinect-filament-spatie-roles-permissions)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1614.1k4](/packages/masterix21-laravel-licensing)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)

PHPackages © 2026

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