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.
Role-Based Access Control (RBAC) Implementation:
Multi-Tenancy Support:
Build vs. Buy:
if statements, custom middleware) with a battle-tested package, reducing technical debt.Use Cases:
Adopt if:
Look elsewhere if:
*"Bouncer is a pre-built, Laravel-native RBAC system that will cut our permission-related development time by 70%—comparable to hiring a mid-level backend engineer for 3 months. For our [SaaS/multi-tenant/admin panel], it lets us:
*"Bouncer replaces our current spaghetti permission system with a clean, Eloquent-based RBAC layer that:
view:post).if ($user->hasRole('admin')) checks everywhere—just Bouncer::allow($user)->to('edit', Post::class).
Trade-offs: Slight learning curve for advanced features (e.g., allowEveryone(), temporary scopes), but docs are solid. Recommended for Laravel 11+—Composer handles version compatibility automatically."**"Bouncer enforces least-privilege access with:
roles, abilities, permissions).
Risk mitigation: MIT-licensed, actively maintained (last release: March 2026), and used by 3.6K+ projects. No vendor lock-in—we can fork if needed."*How can I help you explore Laravel packages today?