PHPackages                             cwsps154/users-roles-permissions - 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. cwsps154/users-roles-permissions

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

cwsps154/users-roles-permissions
================================

Filament User &amp; Roles &amp; Permissions

v1.0.4(7mo ago)183.2k↑16.7%9[4 issues](https://github.com/CWSPS154/users-roles-permissions/issues)[1 PRs](https://github.com/CWSPS154/users-roles-permissions/pulls)MITPHPPHP ^8.2

Since Feb 24Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/CWSPS154/users-roles-permissions)[ Packagist](https://packagist.org/packages/cwsps154/users-roles-permissions)[ RSS](/packages/cwsps154-users-roles-permissions/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (8)Versions (6)Used By (0)

Filament Users Roles Permissions
================================

[](#filament-users-roles-permissions)

[![Logo](screenshorts/code-with-sps-154-users-roles-permissions.jpg)](screenshorts/code-with-sps-154-users-roles-permissions.jpg)

Filament User &amp; Roles &amp; Permissions for Filament v4.

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

[](#requirements)

- PHP 8.2+
- Laravel 10.0+
- Filament 4.0+

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

[](#installation)

Install Using Composer

```
composer require cwsps154/users-roles-permissions
```

Usage/Examples
--------------

[](#usageexamples)

Add this into your Filament `PannelProvider` class `panel()`

```
use CWSPS154\UsersRolesPermissions\UsersRolesPermissionsPlugin;

$panel->databaseNotifications() //need to see the export files for the permission
    ->databaseTransactions() //optional
    ->plugins([UsersRolesPermissionsPlugin::make()]); //required to enable this extension
```

You can also update UserResource using `setUserResource(UserResource::class)` in the plugin

```
use CWSPS154\UsersRolesPermissions\UsersRolesPermissionsPlugin;

$panel->plugins([UsersRolesPermissionsPlugin::make()->setUserResource(UserResource::class)]);
```

You can create custom `UserResource` and extend `CWSPS154\UsersRolesPermissions\Filament\Clusters\UserManager\Resources\UserResource as CoreUserResource`

Add the `CWSPS154\UsersRolesPermissions\Models\HasRole` `trait` in `User` Model

```
use HasRole;
```

And the `User` model should `implements` these `interfaces`'s `Spatie\MediaLibrary\HasMedia`, `Filament\Models\Contracts\HasAvatar` and `Filament\Models\Contracts\FilamentUser`

```
implements HasMedia, HasAvatar, FilamentUser
```

Also don't forget add these in you User model

```
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name',
        'email',
        'mobile',
        'password',
        'role_id',
        'last_seen',
        'is_active'
    ];

    /**
     * The attributes that should be hidden for serialization.
     *
     * @var array
     */
    protected $hidden = [
        'password',
        'remember_token',
    ];

    /**
     * Get the attributes that should be cast.
     *
     * @return array
     */
    protected function casts(): array
    {
        return [
            'email_verified_at' => 'datetime',
            'password' => 'hashed',
            'last_seen' => 'datetime',
            'is_active' => 'boolean',
        ];
    }
```

Run

```
# for laravel 11
php artisan make:queue-batches-table
php artisan make:notifications-table //ensure these queues and notifications migrates are published
# for laravel 10
php artisan queue:batches-table
php artisan notifications:table
# for both
php artisan vendor:publish --tag=filament-actions-migrations //publish filament import and export migrations
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-migrations" //publish spatie media provider
php artisan users-roles-permissions:install
php artisan filament:assets
```

By default, you will get the user which have `email` `admin@gmail.com` &amp; `password` `admin@123`.

Note: For the user which is\_admin user have all permission by default.

You can publish the config file `users-roles-permissions.php`, by running this command

```
php artisan vendor:publish --tag=users-roles-permissions-config
```

you can create additional permissions using `cwsps-permissions.php` config file. The updated permissions can sync to database using this command

```
php artisan permissions:sync
```

Note:Override may do in random manner for packages, the project config have more priority

In your languages directory, add an extra translation for the mobile field by `propaganistas/laravel-phone`

Note:run this command to publish lang folder

```
php artisan lang:publish
```

```
'phone' => 'The :attribute field must be a valid number.',
```

Screenshots
-----------

[](#screenshots)

[![User Roles Permissions Screenshot](screenshorts/user-list.png)](screenshorts/user-list.png)

[![User Roles Permissions Screenshot](screenshorts/user-create.png)](screenshorts/user-create.png)

[![User Roles Permissions Screenshot](screenshorts/user-edit.png)](screenshorts/user-edit.png)

[![User Roles Permissions Screenshot](screenshorts/edit-profile.png)](screenshorts/edit-profile.png)

[![User Roles Permissions Screenshot](screenshorts/role-list.png)](screenshorts/role-list.png)

[![User Roles Permissions Screenshot](screenshorts/role-create.png)](screenshorts/role-create.png)

[![User Roles Permissions Screenshot](screenshorts/role-edit.png)](screenshorts/role-edit.png)

[![User Roles Permissions Screenshot](screenshorts/permission-list.png)](screenshorts/permission-list.png)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance58

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.3% 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 ~53 days

Total

5

Last Release

233d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1404be26270bb4e6e4eb885bb6035a99f1ed0ccc8fdb43be2a969aa7c32117b3?d=identicon)[CWSPS154](/maintainers/CWSPS154)

---

Top Contributors

[![sanoop-ps](https://avatars.githubusercontent.com/u/108001694?v=4)](https://github.com/sanoop-ps "sanoop-ps (33 commits)")[![CWSPS154](https://avatars.githubusercontent.com/u/94110956?v=4)](https://github.com/CWSPS154 "CWSPS154 (1 commits)")[![JawadYzbk](https://avatars.githubusercontent.com/u/87113175?v=4)](https://github.com/JawadYzbk "JawadYzbk (1 commits)")

---

Tags

laravelfilamentfilament-packagesfilament-pluginsfilament-users-roles-permissionscwsps154

### Embed Badge

![Health badge](/badges/cwsps154-users-roles-permissions/health.svg)

```
[![Health](https://phpackages.com/badges/cwsps154-users-roles-permissions/health.svg)](https://phpackages.com/packages/cwsps154-users-roles-permissions)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

81158.7k4](/packages/stephenjude-filament-two-factor-authentication)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

5925.8k](/packages/marcelweidum-filament-passkeys)[chiiya/filament-access-control

Admin user, role and permission management for Laravel Filament

21847.2k](/packages/chiiya-filament-access-control)[a2insights/filament-saas

Filament Saas for A2Insights

161.1k](/packages/a2insights-filament-saas)[caresome/filament-auth-designer

Transform Filament's default auth pages into stunning, brand-ready experiences

3916.8k2](/packages/caresome-filament-auth-designer)

PHPackages © 2026

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