PHPackages                             samasend/laravel-query-diagnosis - 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. samasend/laravel-query-diagnosis

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

samasend/laravel-query-diagnosis
================================

This is a Laravel package that detects and reports unoptimized database queries by leveraging the database's EXPLAIN feature.

v0.1.0(3y ago)28MITPHPPHP ^8.1

Since Apr 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/SamAsEnd/laravel-query-diagnosis)[ Packagist](https://packagist.org/packages/samasend/laravel-query-diagnosis)[ Docs](https://github.com/samasend/laravel-query-diagnosis)[ RSS](/packages/samasend-laravel-query-diagnosis/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Laravel Query Diagnosis
=======================

[](#laravel-query-diagnosis)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cc732924a19af42df7d4066ee5162f50acd6f6877bc9e886fc4403b95e2225cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616d6173656e642f6c61726176656c2d71756572792d646961676e6f7369732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/samasend/laravel-query-diagnosis)[![Build Status](https://github.com/SamAsEnd/laravel-query-diagnosis/actions/workflows/tests.yml/badge.svg)](https://github.com/SamAsEnd/laravel-query-diagnosis/actions/workflows/tests.yml)[![Quality Score](https://camo.githubusercontent.com/c961331b800b6874c22fb12f705e4b0f1ba6f4249f740bcbb549973ed3c106fc/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f73616d6173656e642f6c61726176656c2d71756572792d646961676e6f7369732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/samasend/laravel-query-diagnosis)[![Total Downloads](https://camo.githubusercontent.com/4a8f5452cf947672fbac21add0677fe6ef14e321d5224dd2454a3fa5fe5f1f8c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616d6173656e642f6c61726176656c2d71756572792d646961676e6f7369732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/samasend/laravel-query-diagnosis)

This is a [Laravel](https://laravel.com) package that detects and reports unoptimized database queries by leveraging the database's EXPLAIN feature. This valuable tool helps developers identify performance bottlenecks, optimize database interactions, and enhance the overall efficiency of their applications. By integrating seamlessly into Laravel projects, this package serves as a crucial resource for maintaining optimal database performance and delivering smooth, responsive user experiences.

> This package is heavily inspired by [beyondcode/laravel-query-detector](https://github.com/beyondcode/laravel-query-detector).

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

[](#installation)

You can install the package via composer:

```
composer require samasend/laravel-query-diagnosis --dev
```

The package will automatically register itself.

### 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)

- [Samson Endale](https://github.com/SamAsEnd)
- [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

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

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

Unknown

Total

1

Last Release

1171d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fd28cb32a4cca3aaf21187959977a78066f4bc4c8b110c959efcf117e6dc4c4?d=identicon)[SamAsEnd](/maintainers/SamAsEnd)

---

Top Contributors

[![SamAsEnd](https://avatars.githubusercontent.com/u/9657132?v=4)](https://github.com/SamAsEnd "SamAsEnd (8 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

laraveldatabasequeryelouquentlaravel-query-diagnosis

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/samasend-laravel-query-diagnosis/health.svg)

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

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k54.1M11.1k](/packages/illuminate-database)[tpetry/laravel-query-expressions

Database-independent Query Expressions as a replacement to DB::raw calls

360542.0k3](/packages/tpetry-laravel-query-expressions)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M16](/packages/reedware-laravel-relation-joins)[vectorial1024/laravel-cache-evict

Efficiently remove expired Laravel file/database cache data

5916.2k](/packages/vectorial1024-laravel-cache-evict)[itpathsolutions/dbstan

Database Standardization and Analysis Tool for Laravel

442.1k](/packages/itpathsolutions-dbstan)[sarfraznawaz2005/indexer

Laravel package to monitor SELECT queries and offer best possible INDEX fields.

562.7k](/packages/sarfraznawaz2005-indexer)

PHPackages © 2026

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