PHPackages                             beyondcode/laravel-query-detector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. beyondcode/laravel-query-detector

ActiveLibrary[Database &amp; ORM](/categories/database)

beyondcode/laravel-query-detector
=================================

Laravel N+1 Query Detector

2.3.0(1mo ago)2.0k6.7M—2.7%145[3 issues](https://github.com/beyondcode/laravel-query-detector/issues)[1 PRs](https://github.com/beyondcode/laravel-query-detector/pulls)12MITPHPPHP ^7.1 || ^8.0CI passing

Since Jul 15Pushed 1mo ago20 watchersCompare

[ Source](https://github.com/beyondcode/laravel-query-detector)[ Packagist](https://packagist.org/packages/beyondcode/laravel-query-detector)[ Docs](https://github.com/beyondcode/laravel-query-detector)[ RSS](/packages/beyondcode-laravel-query-detector/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (28)Used By (12)

Laravel N+1 Query Detector
==========================

[](#laravel-n1-query-detector)

[![Latest Version on Packagist](https://camo.githubusercontent.com/62ba486abb09262b622a314220e4bb0172ee8287588ad0db7d0d5b0f3af3ef3b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6265796f6e64636f64652f6c61726176656c2d71756572792d6465746563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/beyondcode/laravel-query-detector)[![Total Downloads](https://camo.githubusercontent.com/107158b9e6c83754b1cbc42f6cad02c7a1a1a4bf19cacf54deab7a24505084b7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6265796f6e64636f64652f6c61726176656c2d71756572792d6465746563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/beyondcode/laravel-query-detector)

The Laravel N+1 query detector helps you to increase your application's performance by reducing the number of queries it executes. This package monitors your queries in real-time, while you develop your application and notify you when you should add eager loading (N+1 queries).

[![Example alert](https://camo.githubusercontent.com/b8ab2382c04c43c7a8b5e25e496ce754298cf99536745ad82f6b9d58e04eccaa/68747470733a2f2f6265796f6e64636f2e64652f6769746875622f6e2b312f616c6572742e706e67)](https://camo.githubusercontent.com/b8ab2382c04c43c7a8b5e25e496ce754298cf99536745ad82f6b9d58e04eccaa/68747470733a2f2f6265796f6e64636f2e64652f6769746875622f6e2b312f616c6572742e706e67)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require beyondcode/laravel-query-detector --dev
```

The package will automatically register itself.

Documentation
-------------

[](#documentation)

You can find the documentation on our [website](http://beyondco.de/docs/laravel-query-detector).

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Marcel Pociot](https://github.com/mpociot)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

73

—

ExcellentBetter than 100% of packages

Maintenance88

Actively maintained with recent releases

Popularity71

Solid adoption and visibility

Community41

Growing community involvement

Maturity78

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~122 days

Recently: every ~214 days

Total

24

Last Release

59d ago

Major Versions

0.6.0 → 1.0.02018-12-13

1.8.0 → 2.0.02024-10-04

PHP version history (2 changes)0.1.0PHP ^7.1

1.5.0PHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/863e91ca13b8c4031f202c0eee4f06b3a4352f92cf9cd397b03609b20247ed16?d=identicon)[beyondcode](/maintainers/beyondcode)

---

Top Contributors

[![mpociot](https://avatars.githubusercontent.com/u/804684?v=4)](https://github.com/mpociot "mpociot (54 commits)")[![mechelon](https://avatars.githubusercontent.com/u/26432041?v=4)](https://github.com/mechelon "mechelon (23 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (7 commits)")[![plakhin](https://avatars.githubusercontent.com/u/25561058?v=4)](https://github.com/plakhin "plakhin (6 commits)")[![marcmascort](https://avatars.githubusercontent.com/u/3595718?v=4)](https://github.com/marcmascort "marcmascort (5 commits)")[![XEngine](https://avatars.githubusercontent.com/u/6682465?v=4)](https://github.com/XEngine "XEngine (3 commits)")[![Braunson](https://avatars.githubusercontent.com/u/577273?v=4)](https://github.com/Braunson "Braunson (3 commits)")[![janpio](https://avatars.githubusercontent.com/u/183673?v=4)](https://github.com/janpio "janpio (3 commits)")[![agus24](https://avatars.githubusercontent.com/u/23353234?v=4)](https://github.com/agus24 "agus24 (2 commits)")[![erikverbeek](https://avatars.githubusercontent.com/u/21066218?v=4)](https://github.com/erikverbeek "erikverbeek (2 commits)")[![matthewnessworthy](https://avatars.githubusercontent.com/u/5653887?v=4)](https://github.com/matthewnessworthy "matthewnessworthy (2 commits)")[![mr-feek](https://avatars.githubusercontent.com/u/5747667?v=4)](https://github.com/mr-feek "mr-feek (2 commits)")[![pyr0hu](https://avatars.githubusercontent.com/u/4921742?v=4)](https://github.com/pyr0hu "pyr0hu (2 commits)")[![stevelacey](https://avatars.githubusercontent.com/u/289531?v=4)](https://github.com/stevelacey "stevelacey (2 commits)")[![Pr3d4dor](https://avatars.githubusercontent.com/u/13210429?v=4)](https://github.com/Pr3d4dor "Pr3d4dor (1 commits)")[![crlcu](https://avatars.githubusercontent.com/u/1661844?v=4)](https://github.com/crlcu "crlcu (1 commits)")[![mikemand](https://avatars.githubusercontent.com/u/745184?v=4)](https://github.com/mikemand "mikemand (1 commits)")[![misenhower](https://avatars.githubusercontent.com/u/1619746?v=4)](https://github.com/misenhower "misenhower (1 commits)")[![BSN4](https://avatars.githubusercontent.com/u/199647?v=4)](https://github.com/BSN4 "BSN4 (1 commits)")[![jackwh](https://avatars.githubusercontent.com/u/627533?v=4)](https://github.com/jackwh "jackwh (1 commits)")

---

Tags

hacktoberfestbeyondcodelaravel-query-detector

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/beyondcode-laravel-query-detector/health.svg)

```
[![Health](https://phpackages.com/badges/beyondcode-laravel-query-detector/health.svg)](https://phpackages.com/packages/beyondcode-laravel-query-detector)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[aglipanci/laravel-eloquent-case

Adds CASE statement support to Laravel Query Builder.

115157.2k](/packages/aglipanci-laravel-eloquent-case)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
