PHPackages                             agroezinger/filament-shield-enhanced - 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. agroezinger/filament-shield-enhanced

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

agroezinger/filament-shield-enhanced
====================================

Fine-grained page permissions &amp; structured UI addon for bezhansalleh/filament-shield.

v0.1.0(1mo ago)33181MITPHPPHP ^8.2CI failing

Since May 28Pushed 1mo agoCompare

[ Source](https://github.com/agroezinger/filament-shield-enhanced)[ Packagist](https://packagist.org/packages/agroezinger/filament-shield-enhanced)[ Docs](https://github.com/agroezinger/filament-shield-enhanced)[ RSS](/packages/agroezinger-filament-shield-enhanced/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (6)Dependencies (22)Versions (7)Used By (0)

Filament Shield Enhanced
========================

[](#filament-shield-enhanced)

Warning

**Testing Phase:** Versions `0.0.*` are currently in the testing phase. At present, there are no known bugs.

A standalone addon for [bezhansalleh/filament-shield](https://github.com/bezhanSalleh/filament-shield) that adds **fine-grained page and resource permissions** and a **structured Role Resource UI** — without forking or replacing the original package.

> **Why this exists.**
> The features were proposed upstream in [bezhanSalleh/filament-shield#698](https://github.com/bezhanSalleh/filament-shield/issues/698). The author has not had time to review the PR. This addon ships the same functionality as a composable layer on top of the official package.

---

Features
--------

[](#features)

FeatureDescription**Multi-action page permissions**Declare several permissions per page via `getShieldPagePermissions()`.**Multi-action resource permissions**Declare custom permissions per resource via `getShieldResourcePermissions()` — beyond the standard CRUD policy methods.**`canShield('action')`**Fluent, type-safe permission check — instance method on Pages, static method on Resources.**`getShieldPermissions()`**Returns a pre-resolved `action → bool` map for injection into child Livewire components.**`HasInjectedShieldPermissions`**Trait for child Livewire components that receive the map from the parent page.**`EnhancedPagePermissionsForm`**Form builder helper for the published RoleResource — renders each enhanced page as a separate Section with individual checkboxes.**`EnhancedResourcePermissionsForm`**Form builder helper for the published RoleResource — renders each enhanced resource as a separate Section with individual checkboxes.**Three-part page key convention**`{Prefix}{sep}{Action}{sep}{Subject}` (e.g. `Page:EditSettings:SettingsPage`) — fully respects filament-shield's `separator` and `case` config.**Two-part resource key convention**`{Action}{sep}{ModelBasename}` (e.g. `ViewContactInfo:Member`) — matches Shield's own resource permission format, no extra prefix.**Zero conflict**Does not replace any original class. Falls back gracefully on entities that do not declare the method.---

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

[](#requirements)

DependencyVersionPHP^8.2Laravel^11.0 | ^12.0 | ^13.0Filament^4.0 | ^5.0bezhansalleh/filament-shield^4.0---

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

[](#installation)

```
composer require agroezinger/filament-shield-enhanced
```

Publish the config (optional):

```
php artisan vendor:publish --tag="filament-shield-enhanced-config"
```

---

Usage — Pages
-------------

[](#usage--pages)

### 1 — Declare fine-grained permissions on a Page

[](#1--declare-fine-grained-permissions-on-a-page)

Replace (or complement) the original `HasPageShield` with the enhanced version:

```
