artesaos/shield
Artesaos Shield gives Laravel apps a lightweight authorization layer for roles and permissions. Define abilities once, assign them to users, and protect routes, controllers, and Blade views with simple, expressive checks.
spatie/laravel-permission, a thin in-house implementation, and this. Given the maintenance signal below, this is effectively out.roles table, a permissions table, pivots, a HasRoles trait, a Gate bridge, Blade directives, and middleware is roughly 1–2 engineer-weeks plus ongoing maintenance. That is the number every package proposal should be measured against.Look elsewhere — which is almost always:
illuminate/* constraints and PHP 8.x. A Composer resolution check will confirm incompatibility quickly; don't spend a spike on it.Executives: Authorization — who can see and do what — is foundational: every downstream feature (admin console, team roles, plan-based gating, audit trails) depends on it. We evaluated artesaos/shield, a lightweight Laravel roles-and-permissions package. It addresses the right problem, but it was last released in July 2016 and has minimal community traction (32 stars). That means no security patches and no support for our current Laravel version — it is effectively unmaintained. Recommendation: do not adopt. Choose between spatie/laravel-permission (actively maintained, the de facto standard) or a narrow in-house implementation. Either way, this is a roughly 1–2 week decision we should lock in before we spec the admin panel and team roles.
Engineering: artesaos/shield offers roles and permissions, Blade directives, middleware, and Gate/Policy-friendly integration via configurable tables and models — a reasonable feature set on paper. But the last release is v1.0.2, dated 2016-07-02, with 32 stars. Practical consequences: no Laravel 6/8/10/11/12 support, no PHP 8.x support, no security disclosure channel, no upgrade path. Don't spend a spike on it — a Composer resolution check against our lockfile will settle it in minutes. Two viable paths: (a) spatie/laravel-permission — maintained, teams support, permission caching, wildcards, broad adoption; or (b) a thin in-house slice — roles/permissions tables, pivots, a HasRoles trait, a Gate bridge, and Blade directives. Option (b) is ~1–2 weeks and gives us full control and no dependency risk on a security-critical path. I recommend (b) if our permission model is simple and (a) if we need teams/tenancy and caching out of the box. Either way, keep the 2016 package out of the dependency graph.
How can I help you explore Laravel packages today?