Skip to content
CAI
Produce a survey ↗Verify a survey

spatie/laravel-permission

This system is a Laravel package that provides a comprehensive role and permission management solution, featuring team-based scoping and configurable model mappings. It enforces access control through middleware, Artisan commands, and Eloquent traits, while offering granular exception handling and event-driven updates. The codebase has been modernized to support PHP 8.4 and Laravel 12+, utilizing Pest for testing and static analysis tools for code quality.

55.4

Adequate · 2 August 2026

3.2k

lines of production code

PHP

primary language

2

bus factor · 275 authors in all

3

measurements over time

CAI band scale
CAI trend line

How it got here

2015 · Modernization and architectural refactoring

This period focused on modernizing the codebase by upgrading to PHP 8.4+ and Laravel 12+, while refactoring core models and introducing PHP contracts for improved type safety. The team also overhauled the testing infrastructure by migrating to Pest, added new Artisan commands and domain events, and implemented a comprehensive set of specific exception classes for better error handling.

9 changes

2017–2026 · Team-based permission scoping

This period focused on implementing team-scoped permissions, introducing a central configuration file to manage package behavior, and adding new middleware for access control. Comprehensive test coverage was added to validate the new team support, middleware, and model behaviors across various guards and caching scenarios.

8 changes

CAI lens gauges

Survey your own repository

spatie/laravel-permission was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point the surveyor at a repository you know and see whether you agree with it.

Survey a repository

About this page

  • The description of this project is derived from its own commit history, not from its README.
  • The score is its highest published measurement, taken on 2 August 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit afd24018f6 — the exact code this score is about.
  • Scored under rubric rubric-2026.08.18. Score the same commit under that rubric and you get the same number.
CAI link cards