PHPackages                             z3d0x/filament-simple-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. z3d0x/filament-simple-permissions

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

z3d0x/filament-simple-permissions
=================================

Simply define the permissions in the filament resource.

v1.0.1(2y ago)9477[1 PRs](https://github.com/Z3d0X/filament-simple-permissions/pulls)MITPHPPHP ^8.0|^8.1|^8.2

Since May 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Z3d0X/filament-simple-permissions)[ Packagist](https://packagist.org/packages/z3d0x/filament-simple-permissions)[ Docs](https://github.com/z3d0x/filament-simple-permissions)[ RSS](/packages/z3d0x-filament-simple-permissions/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (13)Versions (4)Used By (0)

Warning

This package is no longer maintained

Simply define the permissions in the filament resource.
=======================================================

[](#simply-define-the-permissions-in-the-filament-resource)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c89d8f5d3d0fbef71e01f9b09715598d481cad5ade553aa8b46f0b1b4288ed83/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a336430782f66696c616d656e742d73696d706c652d7065726d697373696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/z3d0x/filament-simple-permissions)[![GitHub Tests Action Status](https://camo.githubusercontent.com/ffc096fb616f689242fceb69392117c1214579a5fd900dd17e9d42b7eb2f7512/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7a336430782f66696c616d656e742d73696d706c652d7065726d697373696f6e732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/z3d0x/filament-simple-permissions/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ea4b411eb31b6f1f844cce0fe35bda6be31429a90f2d019664bb1402a002743f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7a336430782f66696c616d656e742d73696d706c652d7065726d697373696f6e732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/z3d0x/filament-simple-permissions/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/8f73638849e6573007891f3c233500c20a20a23a651e51eee6218a58e8cde9e3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a336430782f66696c616d656e742d73696d706c652d7065726d697373696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/z3d0x/filament-simple-permissions)

Easily define permissions for [Filament](https://github.com/laravel-filament/filament) Resources &amp; Relation Managers

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

[](#installation)

You can install the package via composer:

```
composer require z3d0x/filament-simple-permissions
```

This package does not require any additional configuration after installation

Usage
-----

[](#usage)

This package comes with two traits `HasResourcePermissions` and `HasRelationManagerPermissions`, which can be used in Filament's Resources and RelationManagers respectively.

To use simply use the trait in your Resource/RelationManger and define your permissions.

### Resource Example

[](#resource-example)

```
//UserResource.php
use Z3d0X\FilamentSimplePermissions\Concerns\HasResourcePermissions;

class UserResource extends Resource
{
    use HasResourcePermissions;

    protected static array $permissions = [
        'viewAny' => 'access-users',
        'view' => 'access-users',
        'create' => 'create-users',
        'update' => 'update-users',
        'delete' => ['update-users', 'delete-stuff'], //use an array if multiple permissions are needed
        'deleteAny' => false, //also supports boolean, to allow/disallow for all users
    ];
}
```

### RelationManager Example

[](#relationmanager-example)

```
//PostsRelationManager.php
use Z3d0X\FilamentSimplePermissions\Concerns\HasRelationManagerPermissions;

class PostsRelationManager extends HasManyRelationManager
{
    use HasRelationManagerPermissions;

    protected static array $permissions = [
        'create' => 'create-posts',
        'update' => 'update-posts',
        'delete' => ['update-posts', 'delete-stuff'], //use an array if multiple permissions are needed
        'deleteAny' => false, //also supports boolean, to allow/disallow for all users

        //Supports relation manager specific actions.
        'viewForRecord' => 'access-posts',
        'associate' => 'update-posts',
        'dissociate' => 'update-posts',
        'dissociateAny' => false,
    ];
}
```

Advanced Usage
--------------

[](#advanced-usage)

For advanced usage, it is possible to define a static `getPermissions()` method, instead of `$permissions` property

```
//PostsRelationManager.php
use Z3d0X\FilamentSimplePermissions\Concerns\HasRelationManagerPermissions;
use Illuminate\Database\Eloquent\Model;

class PostsRelationManager extends HasManyRelationManager
{
    use HasRelationManagerPermissions;

    protected static function getPermissions(): array
    {
        return [
            'viewForRecord' => fn (Model $ownerRecord) => $ownerRecord->user_id === auth()->id(),
            'update' => function (Model $record) {
                return $record->user_id === auth()->id();
            },
        ];
    }
}
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ziyaan Hassan](https://github.com/Z3d0X)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

2

Last Release

1069d ago

PHP version history (2 changes)v1.0.0PHP ^8.0|^8.1

v1.0.1PHP ^8.0|^8.1|^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7861b66ca9f2a060a888c69014417070ff7d36d0c3b3ba5444f7efb4269459ec?d=identicon)[ZedoX](/maintainers/ZedoX)

---

Top Contributors

[![Z3d0X](https://avatars.githubusercontent.com/u/75579178?v=4)](https://github.com/Z3d0X "Z3d0X (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")

---

Tags

filamentadminfilamentphplaravellaravel-filamentpermissionslaravelfilamentZ3d0Xlaravel-filamentfilament-simple-permissions

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/z3d0x-filament-simple-permissions/health.svg)

```
[![Health](https://phpackages.com/badges/z3d0x-filament-simple-permissions/health.svg)](https://phpackages.com/packages/z3d0x-filament-simple-permissions)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[jeffgreco13/filament-breezy

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

1.0k1.7M41](/packages/jeffgreco13-filament-breezy)[dutchcodingcompany/filament-socialite

Social login for Filament through Laravel Socialite

213914.9k9](/packages/dutchcodingcompany-filament-socialite)[andrewdwallo/filament-companies

A comprehensive Laravel authentication and authorization system designed for Filament, focusing on multi-tenant company management.

34450.0k2](/packages/andrewdwallo-filament-companies)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

81158.7k4](/packages/stephenjude-filament-two-factor-authentication)[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)
