silber/bouncer
Bouncer adds roles and abilities to Laravel with a fluent, Eloquent-powered API. Define permissions, assign roles to users, and authorize actions via gates and middleware. Supports caching, scoped abilities, and a simple, expressive permission model.
Bouncer::scope()->onceTo($tenantId, ...)).Admin, Editor, Viewer).TenantAdmin, TenantUser).Bouncer::allow($user)->to('publish', Post::class)).can('manage_users')).Bouncer::scope()->onceTo($tenantId, ...)).if ($user->role === 'admin') checks to structured RBAC.v1.0.1).v1.0.1 or migrate).v1.0.0).For Executives: "Bouncer lets us implement role-based access control (RBAC) in weeks instead of months, reducing dev time by 70% for features like admin panels or tenant-specific permissions. It’s battle-tested (3.6K+ stars), integrates seamlessly with Laravel, and supports multi-tenancy—critical for our SaaS roadmap. The MIT license and active maintenance (last release: March 2026) make it a low-risk ‘buy’ vs. a custom build."
For Engineers: *"Bouncer gives us:
Admin, Editor, etc., with Bouncer::allow($user)->to('action', Model::class).Bouncer::scope()->onceTo($tenantId, ...).if ($user->role === 'admin') checks.Trade-offs:
v1.0.1 for older versions).Next Steps:
Admin role).Cost: Zero (MIT license). Risk: Low (active maintenance, Laravel-first design)."*
How can I help you explore Laravel packages today?