PHPackages                             laraditz/filament-jaga - 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. laraditz/filament-jaga

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

laraditz/filament-jaga
======================

FilamentPHP v5 plugin for managing roles and permissions with laraditz/jaga

1.1.1(1mo ago)348MITPHPPHP ^8.2

Since Apr 17Pushed 1mo agoCompare

[ Source](https://github.com/laraditz/filament-jaga)[ Packagist](https://packagist.org/packages/laraditz/filament-jaga)[ RSS](/packages/laraditz-filament-jaga/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (8)Used By (0)

Filament Jaga
=============

[](#filament-jaga)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1f90baa5cba7a12a6f97da2591f4701e4c6a60f1857f0f639b4ef65580f4197a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6172616469747a2f66696c616d656e742d6a6167612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laraditz/filament-jaga)[![Total Downloads](https://camo.githubusercontent.com/6a0aec62d3e2b2fe1f558c473998a0e69e34d236aff183310ef80ef2cf303663/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6172616469747a2f66696c616d656e742d6a6167612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laraditz/filament-jaga)[![License](https://camo.githubusercontent.com/d23756fc65762c2192ae8dfeeb016f588868ff4539fa234d77877c63531c4a74/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6172616469747a2f66696c616d656e742d6a6167613f7374796c653d666c61742d737175617265)](./LICENSE.md)

[![Filament Jaga](https://raw.githubusercontent.com/free-whiteboard-online/Free-Erasorio-Alternative-for-Collaborative-Design/49149e3c027039e5e04d365691a002a26c6cf466/uploads/2026-04-18T03-57-46-852Z-32gh15jba.png)](https://raw.githubusercontent.com/free-whiteboard-online/Free-Erasorio-Alternative-for-Collaborative-Design/49149e3c027039e5e04d365691a002a26c6cf466/uploads/2026-04-18T03-57-46-852Z-32gh15jba.png)

A **FilamentPHP v5** plugin for managing roles and permissions, powered by [laraditz/jaga](https://github.com/laraditz/jaga). Simple to set up. Easy to extend.

📸 Preview
---------

[](#-preview)

[![Filament Jaga Preview](https://raw.githubusercontent.com/free-whiteboard-online/Free-Erasorio-Alternative-for-Collaborative-Design/edd63bc33759e665b99394754340edc4f1a279e0/uploads/2026-04-17T13-56-24-719Z-3u4uyd235.png)](https://raw.githubusercontent.com/free-whiteboard-online/Free-Erasorio-Alternative-for-Collaborative-Design/edd63bc33759e665b99394754340edc4f1a279e0/uploads/2026-04-17T13-56-24-719Z-3u4uyd235.png)

✨ Features
----------

[](#-features)

### 🎭 Roles

[](#-roles)

- Create roles with a name and auto-generated slug
- Assign permissions via checkbox list grouped by permission group
- Add wildcard patterns (e.g. `posts.*`) for broad permission grants
- Edit or delete existing roles

### 👤 UserRolesField

[](#-userrolesfield)

- Drop a single form field into your own User resource to assign roles
- Checkbox list with role name and slug hint, bulk-toggle support
- Zero extra wiring — saves automatically when the form saves

### 🔑 Permissions

[](#-permissions)

- **Tabs** — switch between All, Route (auto-discovered), and Custom permissions
- **Grouping** — table rows grouped by permission group for easy scanning
- **Filters** — filter by access level (`public`, `auth`, `restricted`) or show soft-deleted records
- **Edit** — update the group, description, and access level of any permission
- **Create** — add custom permissions not tied to any route
- **Delete** — remove custom permissions (auto-discovered route permissions cannot be deleted)
- **Roles tab** — view, attach, and detach roles assigned to a permission
- **Users tab** — view, attach, and detach users assigned directly to a permission
- **Sync button** — trigger a permission sync from the panel without touching the CLI

📋 Requirements
--------------

[](#-requirements)

DependencyVersionPHP^8.2Laravel^13.0Filament^5.0laraditz/jaga^1.0🚀 Installation
--------------

[](#-installation)

**1.** Install via Composer:

```
composer require laraditz/filament-jaga
```

**2.** Publish the migrations and run them:

```
php artisan vendor:publish --tag=jaga-migrations
php artisan migrate
```

**3.** Add the `HasRoles` trait to your `User` model:

```
use Laraditz\Jaga\Traits\HasRoles;

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

**4.** Register the plugin and protect your panel in your Filament panel provider:

```
use Laraditz\FilamentJaga\FilamentJagaPlugin;
use Laraditz\Jaga\Middleware\JagaMiddleware;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(FilamentJagaPlugin::make())
        ->authMiddleware([JagaMiddleware::class]);
}
```

**5.** Run the installer:

```
php artisan jaga:install
```

This will:

- Publish the config file
- Seed the `jaga.access` permission and `super-admin` role
- Assign the super-admin role to a user of your choice

To assign the role to an existing user non-interactively:

```
php artisan jaga:install --email=admin@example.com
```

To re-assign the role without re-seeding:

```
php artisan jaga:install --assign --email=admin@example.com
```

**6.** Protect your app routes with the `jaga` middleware:

```
// routes/web.php
Route::middleware(['auth', 'jaga'])->group(function () {
    Route::resource('posts', PostController::class);
});
```

**7.** Sync your named routes to the permissions table:

```
php artisan jaga:sync
```

After syncing, all your named routes will appear as permissions in the Filament panel, ready to be assigned to roles.

⚙️ Configuration
----------------

[](#️-configuration)

Publish the config file:

```
php artisan vendor:publish --tag=filament-jaga-config
```

`config/filament-jaga.php`:

```
return [
    'navigation' => [
        'group' => 'Roles & Permissions', // sidebar group label
        'icon'  => 'heroicon-o-shield-check',
        'sort'  => 10,
    ],

    'resources' => [
        'roles'       => true, // set false to hide the Roles resource
        'permissions' => true, // set false to hide the Permissions resource
    ],

    // Permission required to access any page in this plugin
    'permission' => 'jaga.access',

    // Your app's User model
    'user_model' => \App\Models\User::class,
];
```

🎨 Customising the Plugin
------------------------

[](#-customising-the-plugin)

All options are available via a fluent API:

```
FilamentJagaPlugin::make()
    ->navigationGroup('Access Control')
    ->navigationIcon('heroicon-o-lock-closed')
    ->navigationSort(5)
    ->permission('admin.access')
    ->userModel(\App\Models\Admin::class)
    ->disableResource('permissions') // hide the Permissions resource
```

👤 UserRolesField
----------------

[](#-userrolesfield-1)

Drop `UserRolesField` into your own User resource to let admins assign roles from the User edit form — no extra observers or lifecycle hooks needed.

```
use Filament\Schemas\Schema;
use Laraditz\FilamentJaga\Forms\Components\UserRolesField;

public static function form(Schema $schema): Schema
{
    return $schema->components([
        // ... your other fields ...
        UserRolesField::make('jaga_roles'),
    ]);
}
```

The field renders a **Roles** checkbox list (name + slug hint, with bulk-toggle). All changes are persisted automatically when the form saves.

🗄️ Cache &amp; Sync
-------------------

[](#️-cache--sync)

Jaga caches permission data for performance. After making changes to permissions or roles, manage the cache with:

```
php artisan jaga:sync    # discover and sync route permissions to the database
php artisan jaga:cache   # rebuild the permission cache
php artisan jaga:clear   # clear the permission cache
```

You can also trigger a sync directly from the Filament panel — head to the Permissions page and click the **Sync Permissions** button. This dispatches the sync job to the queue without needing CLI access.

🌐 Publishing Translations
-------------------------

[](#-publishing-translations)

```
php artisan vendor:publish --tag=filament-jaga-lang
```

Language files will be published to `lang/vendor/filament-jaga`.

📦 Related
---------

[](#-related)

This plugin is a UI layer on top of [laraditz/jaga](https://github.com/laraditz/jaga). Head over there for the full documentation on permissions, roles, middleware usage, and more.

License
-------

[](#license)

MIT

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance90

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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

Total

6

Last Release

48d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1203676?v=4)[Raditz Farhan](/maintainers/raditzfarhan)[@raditzfarhan](https://github.com/raditzfarhan)

---

Top Contributors

[![raditzfarhan](https://avatars.githubusercontent.com/u/1203676?v=4)](https://github.com/raditzfarhan "raditzfarhan (55 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/laraditz-filament-jaga/health.svg)

```
[![Health](https://phpackages.com/badges/laraditz-filament-jaga/health.svg)](https://phpackages.com/packages/laraditz-filament-jaga)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k3.5M115](/packages/bezhansalleh-filament-shield)[jeffgreco13/filament-breezy

A custom package for Filament with login flow, profile and teams support.

1.0k1.9M52](/packages/jeffgreco13-filament-breezy)[stechstudio/filament-impersonate

A Filament package to impersonate your users.

3903.2M39](/packages/stechstudio-filament-impersonate)[althinect/filament-spatie-roles-permissions

3441.1M10](/packages/althinect-filament-spatie-roles-permissions)[dutchcodingcompany/filament-socialite

Social login for Filament through Laravel Socialite

2141.1M10](/packages/dutchcodingcompany-filament-socialite)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

84192.9k7](/packages/stephenjude-filament-two-factor-authentication)

PHPackages © 2026

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