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

ActiveLibrary

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

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

3.0.5(4mo ago)918.6k↓30.1%13[2 issues](https://github.com/hexters/hexa-lite/issues)MITPHP

Since Jul 1Pushed 3mo 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 1mo ago

READMEChangelogDependenciesVersions (16)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)

**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)

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)V3V4[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://github.com/hexters/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

49

—

FairBetter than 95% of packages

Maintenance78

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.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 ~40 days

Total

15

Last Release

126d 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 (33 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

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

PHPackages © 2026

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