PHPackages                             hexters/hexa-lite - 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. hexters/hexa-lite

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

hexters/hexa-lite
=================

Filament Hexa Lite is a effortless role and permission management plugin for Filament

3.0.6(4w ago)9211.3k↓34%13[2 issues](https://github.com/hexters/hexa-lite/issues)MITPHP

Since Jul 1Pushed 4w ago1 watchersCompare

[ Source](https://github.com/hexters/hexa-lite)[ Packagist](https://packagist.org/packages/hexters/hexa-lite)[ Fund](https://www.buymeacoffee.com/hexters)[ GitHub Sponsors](https://github.com/hexters)[ RSS](/packages/hexters-hexa-lite/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (17)Used By (0)

Filament V5 &amp; Hexa Lite V3
==============================

[](#filament-v5--hexa-lite-v3)

[![Latest Stable Version](https://camo.githubusercontent.com/8f64f5bb7fd12d871f15538371bfd756bc93496a5c2253d1a6ebbe2ef4565887/68747470733a2f2f706f7365722e707567782e6f72672f686578746572732f686578612d6c6974652f762f737461626c65)](https://packagist.org/packages/hexters/hexa-lite)[![Total Downloads](https://camo.githubusercontent.com/e8b95c086254005ad7282d420e3d3b4b6bde2aea3814ed05eef64365be0ce952/68747470733a2f2f706f7365722e707567782e6f72672f686578746572732f686578612d6c6974652f646f776e6c6f616473)](https://packagist.org/packages/hexters/hexa-lite)[![License](https://camo.githubusercontent.com/2eabd67cac7d4a0a62ee85f6794961fcb085a96082fe30d0a009741680e9c8a8/68747470733a2f2f706f7365722e707567782e6f72672f686578746572732f686578612d6c6974652f6c6963656e7365)](https://packagist.org/packages/hexters/hexa-lite)[![Documentation](https://camo.githubusercontent.com/0b650bd2eefe4904a212e0f9ea5507a0c1da17f03d68e1d80aaf52b7d009c6d9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d6f6e6c696e652d663539653062)](https://hexters.github.io/hexa-docs/)

**Filament Hexa Lite** is a free and developer-friendly **role and permission management plugin** for [FilamentPHP V5](https://filamentphp.com/).
It helps you manage user roles and access permissions across Resources, Pages, and Widgets — with support for multi-panel apps via custom guards.

Currently in version 3, Hexa Lite is more intuitive, customizable, and production-ready.

[![Banner](https://github.com/hexters/assets/raw/main/hexa/v2/banner.png?raw=true)](https://github.com/hexters/assets/blob/main/hexa/v2/banner.png?raw=true)

> 📖 **Full documentation:** [hexters.github.io/hexa-docs](https://hexters.github.io/hexa-docs/)

Version Docs.
-------------

[](#version-docs)

VersionFilamentDoc.V1V3[Read Doc.](https://github.com/hexters/hexa-lite/blob/main/docs/README.V1.md)V2V3[Read Doc.](https://github.com/hexters/hexa-lite/blob/main/docs/README.V2.md)V3V5[Read Doc.](https://github.com/hexters/hexa-lite/blob/main/README.md)Index
-----

[](#index)

- [Installation](#installation)
- [Adding Role Selection](#adding-role-selection)
- [Multi Panel Support](#multi-panel-support)
- [Defining Permissions](#defining-permissions)
- [Access Control](#access-control)
    - [Check Permissions in Code](#check-permissions-in-code)
    - [Visible Access](#visible-access)
    - [Laravel Integration](#laravel-integration)
- [Available Traits](#available-traits)
- [Features in Pro Version](#features-in-pro-version)
- [License](#license)
- [Issues &amp; Feedback](#issues--feedback)

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

[](#installation)

Install the package via Composer:

```
composer require hexters/hexa-lite
```

Run the database migration:

```
php artisan migrate
```

Register the plugin in your Filament panel:

```
use Filament\Panel;
use Hexters\HexaLite\HexaLite;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            HexaLite::make(),
        ]);
}
```

Apply the trait to your `User` model:

```
use Hexters\HexaLite\HexaLiteRolePermission;

class User extends Authenticatable
{
    use HasFactory, Notifiable;
    use HexaLiteRolePermission;
}
```

Adding Role Selection
---------------------

[](#adding-role-selection)

To allow role assignment via the admin panel, add a select input to your `UserForm` class:

```
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;

public static function form(Form $form): Form
{
    return $form
        ->schema([
            TextInput::make('email')
                ->unique(ignoreRecord: true)
                ->required(),

            Select::make('roles')
                ->label(__('Role Name'))
                ->relationship('roles', 'name')
                ->placeholder(__('Superuser')),
        ]);
}
```

Multi Panel Support
-------------------

[](#multi-panel-support)

Hexa Lite supports multiple panels, each with its own `auth guard`.

```
public function panel(Panel $panel): Panel
{
    return $panel->authGuard('reseller');
}
```

```
public function panel(Panel $panel): Panel
{
    return $panel->authGuard('customer');
}
```

Configure guards in `config/auth.php`.

Defining Permissions
--------------------

[](#defining-permissions)

Define permissions using the `defineGates()` method on Resources, Pages, or Widgets:

```
use Hexters\HexaLite\HasHexaLite;

class UserResource extends Resource
{
    use HasHexaLite;

    public function defineGates(): array
    {
        return [
            'user.index' => __('Allows viewing the user list'),
            'user.create' => __('Allows creating a new user'),
            'user.update' => __('Allows updating users'),
            'user.delete' => __('Allows deleting users'),
        ];
    }
}
```

Access Control
--------------

[](#access-control)

Users with no assigned role are treated as **Superusers** and have full access by default.

To restrict access to a resource:

```
use Illuminate\Auth\Access\Response;
use Illuminate\Database\Eloquent\Model;

    public static function getViewAnyAuthorizationResponse(): Response
    {
        return hexa()->can('user.index')
            ? Response::allow()
            : Response::deny();
    }

    public static function getCreateAuthorizationResponse(): Response
    {
        return hexa()->can('user.create')
            ? Response::allow()
            : Response::deny(__('You do not have permission to create user.'));
    }

    public static function getEditAuthorizationResponse(Model $record): Response
    {
        return hexa()->can('user.update')
            ? Response::allow()
            : Response::deny(__('You do not have permission to edit this.'));
    }

    public static function getDeleteAuthorizationResponse(Model $record): Response
    {
        return hexa()->can('user.delete')
            ? Response::allow()
            : Response::deny(__('You do not have permission to delete user.'));
    }

    public static function getDeleteAnyAuthorizationResponse(): Response
    {
        return hexa()->can('user.delete')
            ? Response::allow()
            : Response::deny(__('You do not have permission to delete users.'));
    }
```

### Check Permissions in Code

[](#check-permissions-in-code)

Useful in queued jobs, commands, or background services:

```
return hexa()->user(User::first())->can('user.index');
```

### Visible Access

[](#visible-access)

Use `visible()` to conditionally display UI elements:

```
Actions\CreateAction::make('create')
    ->visible(fn() => hexa()->can(['user.index', 'user.create']));
```

### Laravel Integration

[](#laravel-integration)

You can still use Laravel’s native authorization:

```
Auth::user()->can('user.create');

Gate::allows('user.create');

Gate::forUser(User::first())->allows('user.create');

@can('user.create')
    // Blade directive
@endcan
```

Available Traits
----------------

[](#available-traits)

TraitDescription`HexaLiteRolePermission`Apply to your `Authenticatable` user model`HasHexaLite`Use in Resources, Pages, Widgets, or Clusters`UuidGenerator`Use on models with `uuid` fields`UlidGenerator`Use on models with `ulid` fieldsFeatures in Pro Version
-----------------------

[](#features-in-pro-version)

Need more flexibility and control?

Filament Hexa **Pro v3** unlocks powerful features designed for serious projects:

- Role &amp; permission descriptions
- Custom role sorting
- Gate grouping (with nested access)
- Multi-tenancy support
- Meta option storage

A small investment for a much more capable permission system.

Learn more in the official documentation:
👉 [Hexa Pro Documentation](https://hexters.github.io/hexa-docs/)

License
-------

[](#license)

This project is open-source and licensed under the **MIT License**. You are free to use, modify, and distribute it with attribution.

Issues &amp; Feedback
---------------------

[](#issues--feedback)

Found a bug or want to contribute?

Open an issue at:

Thank you for using Filament Hexa Lite!

###  Health Score

53

↑

FairBetter than 96% of packages

Maintenance93

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.6% 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 ~47 days

Recently: every ~67 days

Total

16

Last Release

29d ago

Major Versions

1.0.7 → 2.0.02025-05-14

2.0.0 → 3.02025-08-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d97e7edbbe58dd16d6f776aec2dacf66c5aeb730b9a4aa3de34ca0c1ebbfb9e?d=identicon)[hexters](/maintainers/hexters)

---

Top Contributors

[![hexters](https://avatars.githubusercontent.com/u/7827420?v=4)](https://github.com/hexters "hexters (35 commits)")[![ideacatlab](https://avatars.githubusercontent.com/u/71712824?v=4)](https://github.com/ideacatlab "ideacatlab (10 commits)")[![ekremogul](https://avatars.githubusercontent.com/u/4357998?v=4)](https://github.com/ekremogul "ekremogul (2 commits)")[![loicdelanoe](https://avatars.githubusercontent.com/u/95628210?v=4)](https://github.com/loicdelanoe "loicdelanoe (2 commits)")[![carlopaa](https://avatars.githubusercontent.com/u/11911741?v=4)](https://github.com/carlopaa "carlopaa (1 commits)")[![Ercogx](https://avatars.githubusercontent.com/u/22002063?v=4)](https://github.com/Ercogx "Ercogx (1 commits)")

---

Tags

filament-access-controlHexa pluginrole and permission Filamentrole management Filamentaccess permissions FilamentHexa Filamenthexters ladminHexa installationFilament integrationFilament permission setuprole management PHPFilament panelFilament resource accessFilament widget permissions

### Embed Badge

![Health badge](/badges/hexters-hexa-lite/health.svg)

```
[![Health](https://phpackages.com/badges/hexters-hexa-lite/health.svg)](https://phpackages.com/packages/hexters-hexa-lite)
```

###  Alternatives

[chiiya/filament-access-control

Admin user, role and permission management for Laravel Filament

21852.5k](/packages/chiiya-filament-access-control)[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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