savannabits/entrust
Savannabits/Entrust adds role-based access control to Laravel, letting you assign roles and permissions to users via Eloquent traits, middleware, and Blade directives for simple authorization checks.
Architecture fit. Savannabits/Entrust is a community-maintained continuation of the abandoned zizaco/entrust package, providing trait-based role and permission management (HasRole on the User model, roles/permissions/role_user/permission_role tables, Blade directives, and route middleware). It fits conventional monolithic Laravel applications and admin back-ends that need flat or single-hierarchy RBAC. It does not natively support teams/multi-tenancy permission scoping, wildcard permissions, or the richer guard model offered by spatie/laravel-permission, so it is a defensible choice primarily for legacy continuity rather than greenfield architecture.
Integration feasibility. Integration is low-ceremony: Composer install, publish and run migrations, add traits to the user model, register middleware aliases, and optionally cache the permission tables. The v9.0.0 release explicitly targets Laravel 10 and 11, which places the package in the PHP 8.1+/8.2+ range and makes it viable for currently supported framework versions.
Technical risk. The primary risk is changelog opacity. A major version increment (8.1.0 → 9.0.0) whose only documented change is "Support Laravel 10 and 11" almost certainly signals dropped support for older Laravel/PHP versions and possibly other breaking changes that are not enumerated. Additional risks:
Key questions.
spatie/laravel-permission been done, and what is the cost of staying on Entrust?Stack fit. Appropriate for a single-tenant Laravel 10/11 monolith with straightforward role→permission mapping and an existing Entrust installation (i.e., an upgrade path from 8.x). Poor fit where requirements include per-tenant roles, permission inheritance graphs, or API-token-scoped abilities.
Migration path.
^9.0, run composer update savannabits/entrust, review the diff on published migrations/config, and apply any new migrations. Because this is a major version, treat it as an application upgrade requiring a full regression pass on authorization paths.zizaco/entrust: table and trait naming is largely compatible, but validate the published migration set and namespace imports before swapping the dependency.Compatibility. Confirm the host application is on Laravel 10 or 11 and PHP 8.1+ before attempting the upgrade; otherwise remain on 8.1.0 and record the EOL exposure as accepted risk. Verify compatibility with any packages that also touch the Gate or Auth layer.
Sequencing.
@role/@permission, direct Gate checks).Maintenance. Low day-to-day overhead: four database tables plus an optional cache. The real cost is dependency stewardship — a small-maintainer fork means the team should budget for periodic upstream reviews and be prepared to vendor or fork the package if maintenance lapses.
Support. No commercial support; reliance on GitHub issues and community PRs. Establish an internal owner for the package and a policy for reviewing releases within a defined window (e.g., 30 days for minor/patch, planned window for majors).
Scaling. Role and permission checks are cheap when cached; without caching, expect repeated queries on hot request paths. Plan to enable the permission cache in production and to invalidate it on role/permission mutation (a common source of stale-authorization bugs). The schema does not scale cleanly to very large permission matrices or per-tenant scoping without custom work.
Failure modes.
Ramp-up. Minimal for Laravel developers familiar with Eloquent traits — roughly half a day to model roles, permissions, and seeding conventions. The larger effort is the upgrade verification and the internal decision record justifying Entrust over spatie/laravel-permission.
Recommendation. Adopt v9.0.0 only for applications already on Laravel 10/11 and already using Entrust, and only after obtaining the full changelog and running an authorization regression suite. For new projects, evaluate spatie/laravel-permission first; Entrust's value proposition here is continuity, not capability.
How can I help you explore Laravel packages today?