supliu / laravel-query-monitor
Laravel Query Monitor
Fund package maintenance!
Patreon
Installs: 89 294
Dependents: 0
Suggesters: 1
Security: 0
Stars: 283
Watchers: 10
Forks: 38
Open Issues: 5
Requires
- php: ^7.3 || ^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3
- laravel/framework: ^5.6 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0
- react/socket: ^1.4
Requires (Dev)
- orchestra/testbench: ^3.6 || ^4.0 || ^5.0 || ^6.0
- phpunit/phpunit: ^9.2@dev
This package is auto-updated.
Last update: 2024-11-10 14:01:09 UTC
README
Supliu Laravel Query Monitor is library to monitoring Queries in real-time using Laravel Artisan Command. Basically it opens a socket listening and displays (on terminal) the queries executed in your Laravel application.
How to install
- Use composer to install this package
composer require --dev supliu/laravel-query-monitor
- Run publish command
php artisan vendor:publish --provider="Supliu\LaravelQueryMonitor\ServiceProvider"
How to use
Open you terminal and execute:
php artisan laravel-query-monitor
Now just perform some action in your application that performs some interaction with the database.
Customize
By default, the query listening service will run on host 0.0.0.0 and port 8081. You can customize both the host and the port by providing the optional arguments:
php artisan laravel-query-monitor --host="192.168.0.2" --port=8082
If you change the host and port parameters, you will also need to change the configuration file config/laravel-query-monitor.php
.
License
The Laravel Query Monitor is open-sourced project licensed under the MIT license.