# beyondcode/laravel-query-detector

Laravel N+1 Query Detector

Repository: https://github.com/beyondcode/laravel-query-detector
Canonical: https://ross.abutalabs.com/products/laravel-query-detector
Homepage: https://beyondco.de/docs/laravel-query-detector/usage
Language: PHP
License: MIT
License Family: permissive
Topics: hacktoberfest
Last push: 2026-03-20T15:50:50+00:00

## Health v2 (maintenance only)
Score: 71/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 73, release rhythm 51, longevity 100
- inputs: {"age_days": 2971, "days_push": 166, "days_rel": 166, "gap_med": 157, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2056, forks 144 (observed 2026-08-28T04:06:09.888855+00:00)

## What it is
A Laravel package that detects N+1 query problems in real time during development and alerts developers when eager loading should be used. It supports multiple notification outputs including browser alerts, log files, console warnings, and Laravel Debugbar.

## Use cases
- detect n+1 queries in laravel
- find missing eager loading in eloquent
- improve laravel database query performance
- get notified when a relation query runs too many times
- log n+1 query warnings during development
- show n+1 query alerts in laravel debugbar

## When to choose
- you develop Laravel applications with Eloquent and want to catch N+1 query issues early
- you want configurable thresholds, whitelisting, and multiple output channels for query warnings
- you want a zero-config dev dependency that activates automatically in debug mode

## When to avoid
- your application does not use Laravel or Eloquent
- you need production query performance monitoring rather than development-time detection
- you need a general-purpose database profiler or APM solution

## Facets
- artifact type: library
- maturity: active
- function: monitoring, database, logging, developer-tools
- domain: web-development, databases, developer-tools, performance
- platform: php
- tags: laravel-package, n-plus-one-queries, eager-loading, orm-performance, dev-dependency, debug-mode, laravel, web-server

## Member repositories
- beyondcode/laravel-query-detector (main) score 71

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:09.888855+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:57:11.837146+00:00, confidence not recorded.
  - readme: https://github.com/beyondcode/laravel-query-detector (fetched 2026-08-28T04:06:09.888855+00:00, sha 2b5eb2d6ad4c)
  - homepage: https://beyondco.de/docs/laravel-query-detector/usage (fetched 2026-08-29T10:37:27.330575+00:00, sha 0f3238f17f5e)
  - site_page: https://beyondco.de/about-us (fetched 2026-08-29T10:37:27.333628+00:00, sha 0ca14b140952)
  - site_page: https://beyondco.de/docs/laravel-query-detector/installation (fetched 2026-08-29T10:37:27.338421+00:00, sha 76014511f075)
  - site_page: https://beyondco.de/open-source (fetched 2026-08-29T10:37:27.335948+00:00, sha a637112a3111)
- Data as of 2026-08-30T08:39:29.467469+00:00.
