sourceboat/laravel-static-permission
Laravel Static Permission lets you define permissions in code or configuration instead of database tables. Check access with familiar Gate, middleware, and Blade helpers—ideal for apps with fixed, predictable authorization rules and no permission-table overhead.
Verdict up front: the package addresses a legitimate architectural pattern — permissions as code rather than database rows — but the adoption signals are effectively absent (0 stars, 0 dependents, score 0). Treat this as a pattern reference first and a dependency second. The core capability is small enough (likely a config/class registry plus a Gate integration) that building it in-house is a credible alternative to taking a dependency on an unmaintained, unvalidated authorization package.
Architecture fit
Gate/Policy layer. If it does, controllers, Blade @can, middleware, and policies are unchanged and the package is swappable. If it introduces its own authorization API, it becomes a sticky dependency on an unmaintained library inside a security-critical path.Integration feasibility
composer require with Laravel package auto-discovery, a publishable config file, and permission/role classes in app/. Low integration effort for a spike; realistically a day or two to validate.Technical risk
Key questions for the maintainers / spike
Gate/Policy (and Gate::before), or a bespoke authorization API?* permission support?config:cache, Octane, and queued jobs?Stack fit
Gate and handles unauthenticated/queued contexts gracefully.Migration path (from spatie/laravel-permission or custom tables)
@can, Gate::allows, middleware, policies). This is the expensive step, not the library swap.Gate-based, leave controllers/views untouched; swap only the provider behind Gate.Compatibility and sequencing
@can, middleware, API guard, queue job, and config:cache behavior.Maintenance
Support
Scaling
Failure modes
config:cache time; a class-based registry is safer than config arrays here.Ramp-up
@can knowledge transfers if Gate-native.Recommendation: conditionally viable for small, code-deployed permission models where the team accepts ownership of a fork. Do not adopt as a black-box dependency for a security-critical, long-lived product. Validate Gate integration and role-assignment semantics in a one-day spike; if those hold, vendor the code under your own namespace and move on.
How can I help you explore Laravel packages today?