olivier127/rbac-bundle
RBAC Bundle brings role-based access control to Laravel apps, letting you define roles and permissions, assign them to users, and enforce authorization via middleware, gates, and Blade directives. A flexible, configurable permission layer for cleaner access management.
config/rbac.php to publish, no facade, no Eloquent integration. It hooks into the Symfony DI container via a compiler pass. If you are working in a Laravel app, the only realistic use is as a standalone library in a non-Laravel sub-project — don't plan on dropping it into composer require of an existing Laravel codebase and expecting php artisan vendor:publish to do anything useful.RBACAttributeInterface. That interface is the extension point: custom attributes implement it, and the bundle's voter/checker layer reads them off controllers, actions, or services. Read the interface, then read the built-in implementations — that is the whole mental model of the package.Gate-style check. Then move the role→permission mapping into the bundle's config so authorisation stops being scattered across conditionals.^1.1.3 if you are on PHP 8.5. 1.1.2 is a fatal error on that runtime (see Gotchas), not a warning.RBACAttributeInterface as your custom-attribute contract. For in-house rules (tenant scoping, resource ownership), implement the interface and register the attribute the same way the built-ins are registered. Don't subclass built-in attributes to "extend" them — the bundle's metadata reader is looking at the attribute class, not your subclass's intent.#[Attribute] cannot be applied to an interface — that is the entire 1.1.3 fix. 1.1.2 annotated RBACAttributeInterface with #[Attribute], which PHP 8.5 rejects as a fatal error. If you forked or vendored the bundle, apply the same removal to your copy; the annotation was always invalid, 8.5 just stopped tolerating it.dd()-friendly facade, no container binding you can app()->make(). Debugging means reading the Symfony container compile output and var/cache, so budget time for the first integration.How can I help you explore Laravel packages today?