Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Acl Laravel Package

yajra/laravel-acl

A lightweight Laravel ACL package for role and permission management. Assign roles to users, attach permissions to roles, and check access with simple Eloquent-friendly APIs and Blade helpers.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on a non-differentiating capability. Authorization is table stakes for nearly every product; no roadmap is won by a better roles table. This package converts "build a role/permission subsystem" into "configure and seed one" — the right side of the buy ledger for a v1 or MVP. Frame the decision to stakeholders as engineering weeks reclaimed on something no customer will ever evaluate us on, and record the accepted cost: a third-party dependency in a security-adjacent area.
  • Pricing, packaging, and entitlement shape. Coarse global roles (Admin / Manager / Member / Guest) with per-user permission overrides map cleanly onto tiered plans, seat entitlements, and customer-configurable roles. While pricing tiers are still being shaped, the role-with-overrides model gives product a sane default to design against — and a cheap way to test whether per-customer role customization is a real buying criterion or just a feature-request talking point.
  • Feature gating as a reviewable product decision. Route role/permission middleware plus @role and @permission Blade directives make "who sees this" an explicit, diffable spec item — nav items, destructive buttons, admin panels, export actions — instead of a convention re-invented per squad. That shortens the loop from spec to correctly gated shipped feature and gives QA a concrete checklist rather than tribal knowledge.
  • Roadmap sequencing around framework upgrades. v13.1.0 is the Laravel 13 compatibility patch for serializable class handling — the kind of breakage that surfaces late, at queue-drain time, in jobs carrying ACL entities. For a PM this converts an open upgrade risk into a closed one. A stalled framework upgrade freezes every feature queued behind it, so this is roadmap de-risking, not housekeeping.
  • Permission governance as an artifact. Seeder-driven, idempotent role and permission catalogues turn production authorization folklore into a reviewed pull request. That pays off disproportionately during SOC 2 / ISO evidence collection, support escalations ("why can this person see that?"), and onboarding new engineers into the admin surface.
  • MVP scope-cutting with a named re-evaluation point. For a v1 this removes an entire subsystem from the critical path. The PM-side discipline is to write the re-evaluation trigger now — e.g. "when multi-tenant role scoping, audit-grade immutable auth logs, or SSO/SCIM role sync enters the 12-month horizon, we reopen build-vs-buy."

What this package does not decide for you: tenant-scoped roles, immutable compliance-grade authorization logs, attribute/resource-level policy semantics, and federated identity role sync are all out of scope. If any of those sit on the near roadmap, treat this as a v1 accelerator with a planned exit, not a permanent foundation.

When to Consider This Package

Adopt when:

  • You are on, or moving to, Laravel 13 with a conventional single-database, single-tenant User model and standard auth guards. The v13.1.0 release is direct evidence the package tracks framework majors rather than lagging them.
  • Your authorization model is genuinely role-with-overrides: global roles, per-user exceptions, permission inheritance. That is exactly the shape this package expresses naturally; forcing it into another shape is where the cost hides.
  • You want time-to-first-value measured in hours. Install, publish config and migrations, add the HasRole trait, protect an admin route, gate one nav element — the entire loop (schema → trait → middleware → presentation) is one demoable slice.
  • You treat maintenance momentum as a selection criterion. A patch shipped against a framework major is the concrete signal that this dependency will not become the blocker for your next platform upgrade.
  • You need a reviewable, seeder-driven permission catalogue rather than permissions hand-edited in production.
  • You are comfortable standardizing on native Laravel can() / Policies for ownership checks, using this package only for the coarse gate. Mixed models are fine — silent drift between them is not.

Look elsewhere when:

  • Multi-tenancy with per-tenant role scoping is on the 12-month roadmap. There is no config flag for it; retrofitting means rewriting the pivot schema and every check. Treat this as a v1 accelerator with a scheduled re-evaluation, not a foundation.
  • Audit-grade authorization logging is a requirement. There is no immutable record of who granted or revoked what, and when. You build and maintain that yourself (an event listener on role attach/detach is the pragmatic start).
  • You need resource- or attribute-level authorization as the primary model. Ownership and per-object rules belong in Laravel Policies; encoding them into ACL tables is the anti-pattern the package's own guidance steers you away from.
  • Role hierarchies or per-role inheritance are core semantics. This is a flat RBAC layer; pretending otherwise produces a rewrite.
  • You need commercial support, SLAs, or a large adoption base to lean on. 113 stars, zero dependents, no vendor backing — you are an early adopter. The mitigation is that the code is thin trait and middleware composition over a small Eloquent schema, so the read-and-fork fallback is real. Budget an hour to read the trait source now and the dependency stops being a black box.
  • You are not on a matching Laravel major. Version pairing is effectively "which Laravel major → which ACL major." Do not force a framework upgrade for an authorization package.

Adoption preconditions worth gating the decision on: a cache-flush-on-deploy convention (permission checks are cache-backed; stale cache is the incident generator), a CI test that proves a bad guard denies rather than silently permits, and idempotent seeders keyed on permission name.

How to Pitch It (Stakeholders)

For executives (30-second version). Every product needs roles and permissions; none of ours will be won by how we build them. This package is a small, MIT-licensed Laravel library that lets us configure authorization instead of building it, taking a subsystem off the v1 critical path and giving us a reviewable, seeded permission catalogue instead of production folklore. It is actively maintained against the current Laravel major, which closes an upgrade risk that would otherwise freeze features queued behind it. The trade-off is honest and bounded: it is a focused, low-adoption open-source dependency in a security-adjacent area, it does not do multi-tenancy or audit-grade logs, and the code is small enough that we could own it ourselves if maintenance ever stalled. Recommendation: adopt for v1, with a written re-evaluation trigger tied to multi-tenant scoping, compliance logging, or SSO/SCIM role sync entering the 12-month horizon.

For engineering (what we're actually signing up for). Pin the major (^13.1 on Laravel 13 — do not start on 13.0.0, which predates the serializable fix), publish config and migrations, add the HasRole trait, register the role and permission middleware aliases, and seed a real catalogue idempotently with updateOrCreate keyed on permission name. Standardize on can() and Laravel Policies in application code; keep permission names in constants, not string literals; put a single Gate::before in place for super-admins rather than an isSuperAdmin() preamble in every policy; apply middleware to route groups, not individual routes. Two conventions are non-negotiable before launch: flush the ACL cache on every deploy that touches roles or permissions, and test that a misconfigured guard denies — assert 403/401 in CI, not a redirect that masks the problem. Treat the published config as the extension point; do not fork the trait. The package handles coarse access ("can reach the billing module"); native Policies handle ownership ("can edit this invoice"). That split is the design, not a compromise.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
laravel2580/idehelpers
delatbabel/viewpages
anavel/gettext
muhamadrezaar/highcharts
delatbabel/keylists
frankkessler/salesforce-laravel-oauth2-rest
anavel/foundation
wdmtech/enviricons
eii/laravel-captcha
muka/shape-reader
tdt/json
refinery29/php-cs-fixer-config
hotmeteor/eco-env
mvaliolahi/hydrate
wearede/tbcpay-php
parsnick/steak
thibaud-dauce/mattermost-php
multilinguals/apollo-client
antaresbr/collection
kr0lik/phpstan-rules