PHPackages                             muhdfaiz/laravel-tail-db - 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. muhdfaiz/laravel-tail-db

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

muhdfaiz/laravel-tail-db
========================

Provide artisan command to monitor realtime database query executed from the application. Able to automatically run explain command for each of query received.

1.1.3(4y ago)5826.7k↑20%3MITPHPPHP ^7.0

Since Nov 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/muhdfaiz/laravel-tail-db)[ Packagist](https://packagist.org/packages/muhdfaiz/laravel-tail-db)[ RSS](/packages/muhdfaiz-laravel-tail-db/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (6)Used By (0)

Laravel Tail DB
===============

[](#laravel-tail-db)

[![tests](https://github.com/muhdfaiz/laravel-tail-db/workflows/testing/badge.svg)](https://github.com/muhdfaiz/laravel-tail-db/actions)[![Version](https://camo.githubusercontent.com/deddbddb458f5d9e3661ca77b19b829394e759a41f687b363a019c43732cbd01/68747470733a2f2f706f7365722e707567782e6f72672f6d7568646661697a2f6c61726176656c2d7461696c2d64622f76657273696f6e)](//packagist.org/packages/muhdfaiz/laravel-tail-db)[![Total Downloads](https://camo.githubusercontent.com/743fe340bbfe6b758bbe9b18db7aee8b0e8698e4fded357e5cc9ce54a58b78f5/68747470733a2f2f706f7365722e707567782e6f72672f6d7568646661697a2f6c61726176656c2d7461696c2d64622f646f776e6c6f616473)](//packagist.org/packages/muhdfaiz/laravel-tail-db)[![License](https://camo.githubusercontent.com/3b61c9028de7ccd3dc44a12368479b93c0a6dfe2d16c3b17f2f481cda7541d70/68747470733a2f2f706f7365722e707567782e6f72672f6d7568646661697a2f6c61726176656c2d7461696c2d64622f6c6963656e7365)](//packagist.org/packages/muhdfaiz/laravel-tail-db)

An artisan command to monitor, troubleshoot and optimize SQL query using console.

[![](https://camo.githubusercontent.com/41d1a47bb11b2332cfefcb13398999c8a927929894b013a9a09fb14fba7cd43f/68747470733a2f2f6d7568646661697a2e6769746875622e696f2f6c61726176656c2d7461696c2d64622f6173736574732f696d616765732f64656d6f2e676966)](https://camo.githubusercontent.com/41d1a47bb11b2332cfefcb13398999c8a927929894b013a9a09fb14fba7cd43f/68747470733a2f2f6d7568646661697a2e6769746875622e696f2f6c61726176656c2d7461696c2d64622f6173736574732f696d616765732f64656d6f2e676966)

Features
--------

[](#features)

- **Monitor SQL query.** Display Realtime SQL query executed from application in the console.
- **Optimize SQL query.** Automatically run `explain` command and output to console.
- **Detect slow SQL query.** Highlight slow SQL query according to your config.

Requirements
------------

[](#requirements)

- PHP: ^7.0
- Laravel: ~5.5,~5.6,~5.7,~5.8,~6.0,~7.0,~8.0
- Lumen

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

[](#installation)

```
composer require muhdfaiz/laravel-tail-db

```

Publish Config File
-------------------

[](#publish-config-file)

```
php artisan vendor:publish --provider="Muhdfaiz\LaravelTailDb\TailDatabaseServiceProvider" --tag="tail-db-config"

```

Usage
-----

[](#usage)

```
php artisan tail:db

```

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

[](#documentation)

For detail of installation instructions, in-depth usage, please take a look at the [documentation](https://laravel-tail-db.muhdfaiz.com/).

### Changelog

[](#changelog)

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

### Roadmap

[](#roadmap)

Create desktop app to monitor the sql query.

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

[](#contributing)

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

License
-------

[](#license)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~53 days

Total

5

Last Release

1787d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18674455?v=4)[Muhammad Faiz Halim](/maintainers/muhdfaiz)[@muhdfaiz](https://github.com/muhdfaiz)

---

Top Contributors

[![muhdfaiz](https://avatars.githubusercontent.com/u/18674455?v=4)](https://github.com/muhdfaiz "muhdfaiz (23 commits)")

---

Tags

databaselaravelmonitoringmysqloptimizepostgresqlsqliteloglaraveldatabasetailqueryexplaintail-db

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/muhdfaiz-laravel-tail-db/health.svg)

```
[![Health](https://phpackages.com/badges/muhdfaiz-laravel-tail-db/health.svg)](https://phpackages.com/packages/muhdfaiz-laravel-tail-db)
```

###  Alternatives

[tpetry/laravel-query-expressions

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

357436.5k2](/packages/tpetry-laravel-query-expressions)[renoki-co/l1

Laravel integration for Cloudflare Workers services.

16113.1k](/packages/renoki-co-l1)[sarfraznawaz2005/indexer

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

562.7k](/packages/sarfraznawaz2005-indexer)[addapp/laravel-query-log

Logs full mysql queries.

135.4k](/packages/addapp-laravel-query-log)

PHPackages © 2026

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