spatie/laravel-permission
Associate users with roles and permissions observed · 2026-08-28
Health v2 · maintenance only
96/100
- Activity 99
- Release rhythm 91
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 7.0
- age_days: 4006
- days_rel: 61
- days_push: 9
- n_releases_24m: 33
Adoption not part of the score
12964 stars · 1821 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A Laravel package that lets you associate users (and other Eloquent models) with roles and permissions stored in the database. Permissions are registered with Laravel's gate so they work with the standard `can` checks and Blade `@can` directives.
Use cases
- add role-based access control to a Laravel app
- assign permissions to users in a database
- group permissions into roles like writer or admin
- check user permissions with Laravel's can() and Blade @can
- manage permissions across multiple auth guards
- restrict API or page access based on user roles
When to choose
- you are building a Laravel application and need RBAC
- you want roles and permissions persisted in your database via Eloquent
- you want permissions to integrate with Laravel's native gate and Blade directives
- you need multi-guard support for separate permission sets
When to avoid
- you are not using Laravel or Eloquent
- you need fine-grained, attribute-based or policy-heavy authorization beyond simple roles/permissions
- you need a standalone authorization service independent of your PHP framework
Facets
library · maturity stable
authorization auth middleware web-development backend security developer-tools php self-hosted laravel roles-and-permissions rbac eloquent spatie gate-integration web-server
10 sources
- readme: https://github.com/spatie/laravel-permission · fetched 2026-08-28 · 3f7788963006
- homepage: https://spatie.be/docs/laravel-permission · fetched 2026-08-29 · 755ef9d58265
- site_page: https://spatie.be/docs/laravel-permission/v8 · fetched 2026-08-29 · 5baa1b2ca242
- site_page: https://spatie.be/docs · fetched 2026-08-29 · 08e024d86d95
- site_page: https://spatie.be/about-us · fetched 2026-08-29 · d3cb88e4b34c
- site_page: https://spatie.be/docs/laravel-permission/v7 · fetched 2026-08-29 · 604168dd1b1b
- site_page: https://spatie.be/docs/laravel-permission/v6 · fetched 2026-08-29 · dd9982006cb0
- site_page: https://spatie.be/docs/laravel-permission/v5 · fetched 2026-08-29 · 1cf7100f982b
- site_page: https://spatie.be/docs/laravel-permission/v4 · fetched 2026-08-29 · c6617c82de12
- site_page: https://spatie.be/docs/laravel-permission/v3 · fetched 2026-08-29 · af08f058bd86
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| spatie/laravel-permission | main | 96 |
For agents
markdown · JSON · MCP: product_card(name="spatie/laravel-permission")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem