binary-cats/rbac
Binary Cats RBAC is a Laravel role-based access control package for managing roles, permissions, and guards. It provides middleware, Blade directives, caching, and a fluent API to secure routes, controllers, and UI elements with minimal configuration.
Architecture fit. binary-cats/laravel-rbac is a conventional Laravel authorization package: service provider registration, publishable config and migrations, Eloquent models for roles/permissions, and Gate/Policy plus middleware integration. It slots into a standard Laravel app without imposing a new architectural layer, which keeps it reversible. Release 2.4.0 adds Boost guidelines — Laravel Boost is the AI-assisted-development guideline layer (AGENTS.md / .ai/guidelines-style context files). That means this release is developer-experience and documentation surface, not runtime authorization behavior. It is a signal that the maintainers are investing in AI-assisted onboarding, and it is low-risk by construction.
Integration feasibility. Composer install, publish assets, migrate, seed a role/permission matrix, attach middleware to route groups, and replace ad-hoc checks with can/Gate calls. Realistically a 3–5 day spike and a 2–3 week full rollout for a mid-sized app, dominated by the backfill and the authorization matrix definition rather than the package itself. The Boost guidelines lower the cost of getting the API right on the first pass, particularly for engineers (or agents) unfamiliar with the package's naming conventions.
Technical risk. Low for this specific release: no API changes, no deprecations, no breaking changes, no schema changes. The material risks are package-level, not release-level:
spatie/laravel-permission, the de facto incumbent; running both is a correctness hazard.Key questions.
users.role column or from spatie/laravel-permission?Stack fit. Targets standard Laravel (Eloquent, Gate, middleware, service providers) on current PHP. It assumes a relational store with pivot tables and will behave best on MySQL or Postgres; SQLite is fine for CI but should not be the basis for concurrency assumptions. The immediate competitive comparison is spatie/laravel-permission — pick one, and record the decision. Choosing this package is defensible if the team wants a lighter, Laravel-native surface; choosing Spatie is defensible on ecosystem maturity. Do not run both.
Migration path. (1) Install and pin in a non-production environment. (2) Publish config and migrations; review the generated schema before applying. (3) Backfill roles and permissions from existing columns or tables via a one-time seeder or artisan command. (4) Run a shadow-read period where legacy checks remain authoritative and package checks are logged for divergence. (5) Cut over route-group by route-group, starting with low-blast-radius areas. (6) Remove legacy checks and columns once divergence is zero for a full release cycle.
Compatibility. Verify composer constraints against the application's Laravel and PHP versions before committing; verify database driver support; verify that the 2.4.0 Boost guidelines match the version actually installed, and vendor the guideline files into the repo rather than relying on them being regenerated. If the app uses Octane or a long-lived worker, confirm cache invalidation behaves correctly across workers.
Sequencing. Package evaluation spike → schema and backfill design → canonical role/permission matrix authored by product (not engineering alone) → middleware rollout by route group → cache configuration and invalidation testing → documentation and AI-guideline adoption → legacy removal. The role matrix is the long pole; start it in parallel with the spike, not after.
Maintenance. Low ongoing code maintenance, moderate dependency hygiene. Pin to a minor version, review changelogs on release, and budget a small recurring slice of platform capacity each quarter. The 2.4.0 release requires no action beyond a routine bump and, optionally, adopting the new guidelines.
Support. Community-supported via GitHub issues; no vendor SLA. Escalation for a production authorization defect is on the internal team. The Boost guidelines are a genuine support-cost reducer here: they shorten onboarding and reduce the volume of "how do I check a permission" questions, and they improve the accuracy of AI-assisted code generation against the package API — provided the guidelines are pinned and reviewed like any other doc.
Scaling. Authorization checks run per request, so the package's caching behavior is the primary scaling lever. Expect to configure a shared cache store (Redis) in multi-node deployments, eager-load roles and permissions to avoid N+1s, and index the pivot tables. Role/permission tables are small; the cost is query volume and cache coherence, not data size.
Failure modes. Stale permission cache producing either silent privilege escalation or spurious denials; middleware ordering or missing middleware on newly added routes leaving endpoints unprotected by default; partial rollback leaving orphan tables; dual-RBAC coexistence after an incomplete migration; and guideline drift where AI-generated code targets a different package version than the one installed. Each of these is mitigated by a deny-by-default route convention, an integration test that asserts unauthorized access returns 403, and a cache-invalidation test on role mutation.
Ramp-up. A Laravel-fluent engineer should be productive in one to two days; the Boost guidelines compress that further for AI-assisted workflows. The package does not define the organization's role model — that document, plus the deny-by-default convention, is the real onboarding artifact and should be owned by product with engineering review.
How can I help you explore Laravel packages today?