PHPackages                             shanerbaner82/panel-roles - 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. shanerbaner82/panel-roles

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

shanerbaner82/panel-roles
=========================

Filament Panel Roles is an intuitive way to ensure all users of a specified panel within Filament v3 is assigned a role during registration and has a specified role using Laravel Middleware.

v0.0.3(2y ago)1621.6k↓60.1%4[3 issues](https://github.com/shanerbaner82/panel-roles/issues)MITPHP

Since Sep 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/shanerbaner82/panel-roles)[ Packagist](https://packagist.org/packages/shanerbaner82/panel-roles)[ RSS](/packages/shanerbaner82-panel-roles/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

[![Filament Panel Roles](https://github.com/shanerbaner82/panel-roles/raw/main/images/shanerbaner82-panel-roles.jpg)](https://github.com/shanerbaner82/panel-roles/blob/main/images/shanerbaner82-panel-roles.jpg)

Filament Panel Roles
--------------------

[](#filament-panel-roles)

Filament Panel Roles is an intuitive way to ensure all users of a specified panel within Filament v3 is assigned a role during registration and has a specified role using Laravel Middleware.

### Installation

[](#installation)

```
  composer require shanerbaner82/panel-roles
```

### Setup

[](#setup)

Filament Panel Roles requires you to install [Spatie's Laravel Permissions package](https://spatie.be/docs/laravel-permission). the minimum setup required is to:

1. Install Spatie's package
2. Add the [RoleMiddleware](https://spatie.be/docs/laravel-permission/v5/basic-usage/middleware) to your`app/Http/Kernel.php`

### Usage

[](#usage)

Inside any of your Filament panels add the Panel Roles plugin and specify the role users will be assigned and must have in order to login.

```
use Shanerbaner82\PanelRoles\PanelRoles;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ...
            ->plugin(PanelRoles::make()
                ->roleToAssign('developer')
                ->restrictedRoles(['admin', 'developer']),
            )
    }
}
```

Technically you do not need to chain the `registration()` function on your panel, but if you do when a user registers they will be assigned the provided role.

### Bonus

[](#bonus)

Watch [LaravelOnline](https://www.youtube.com/@LaravelOnline) on YouTube to see how this plugin was created and to learn more about Laravel and Filament!

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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 ~9 days

Total

3

Last Release

998d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/16cc4d562d3f6f302901f1c65eb3ce819c0fb24ab2616241c605126102812ca4?d=identicon)[shanerbaner82](/maintainers/shanerbaner82)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/shanerbaner82-panel-roles/health.svg)

```
[![Health](https://phpackages.com/badges/shanerbaner82-panel-roles/health.svg)](https://phpackages.com/packages/shanerbaner82-panel-roles)
```

###  Alternatives

[filament/filament

A collection of full-stack components for accelerated Laravel app development.

3829.6M3.6k](/packages/filament-filament)[filament/spatie-laravel-media-library-plugin

Filament support for `spatie/laravel-medialibrary`.

1806.0M194](/packages/filament-spatie-laravel-media-library-plugin)[filament/forms

Easily add beautiful forms to any Livewire component.

4831.0M417](/packages/filament-forms)[filament/tables

Easily add beautiful tables to any Livewire component.

3730.5M152](/packages/filament-tables)[filament/infolists

Easily add beautiful read-only infolists to any Livewire component.

1327.7M64](/packages/filament-infolists)[filament/notifications

Easily add beautiful notifications to any Livewire app.

2530.8M86](/packages/filament-notifications)

PHPackages © 2026

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