livelyworks/laravel-yes-authority
LivelyWorks Yes Authority is a Laravel package for role- and permission-based access control. It helps define roles, assign permissions, and protect routes and views with simple authorization checks.
authorize()/can: checks across controllers and views.Consider it when:
admin.*, reports.view).Look elsewhere when:
Gate::before, or a dedicated library (e.g., spatie/laravel-permission plus policies).can: middleware, Gate::before, and route-level grouping have matured — you may not need a package at all.For executives: This is a low-cost, MIT-licensed way to centralize "who can access which screen" in one reviewable file, which reduces the risk of accidentally exposed admin routes and makes access control auditable. The trade-off is community size: a handful of stars, no downstream dependents, and a 2023 release mean we should treat it as adopt-with-a-fork-plan, not a long-term strategic dependency. Recommendation: a short, low-risk pilot in one internal app, with the rules extracted into a thin internal wrapper so we can swap or reimplement without rewrites.
For engineering: The package provides a route-name-driven authorization map with wildcards, role inheritance, and cached lookups, exposed via middleware. It complements — not replaces — Laravel Gates/Policies: use it for route-level (coarse) gates and Policies for model-level (fine) checks. Because the code surface is small, the recommendation is to pin the version, wrap calls behind our own interface, and keep an in-house fallback (config + middleware) ready. This preserves the ergonomic win today while eliminating the abandonment risk tomorrow, and it keeps our authorization model easy to test, review, and evolve as roles grow.
How can I help you explore Laravel packages today?