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)1619.4k↓40.5%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 1mo 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 49% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

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

952d 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

[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)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)

PHPackages © 2026

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