mattiasgeniar/phpunit-query-count-assertions
Add PHPUnit/Pest assertions to count and analyze SQL queries in tests. Catch N+1 issues, duplicate queries, slow queries, missing indexes (EXPLAIN), row count problems, and Laravel lazy loading. Supports Laravel 11/12, Doctrine DBAL 4, and Phalcon 6+.
Architecture fit: Laravel's Eloquent ORM uses PDO under the hood, aligning perfectly with the package's PDO/Doctrine-style logging compatibility. The package hooks
How can I help you explore Laravel packages today?