Skip to content

pnlinh/laravel-query-logger

Repository files navigation

Enable/disable query logger in Laravel/Lumen

StyleCI CircleCI Quality Score

Requirements

  • PHP >= 7.1.3
  • Laravel >= 5.5.*

Installation

Require this package with composer.

composer require pnlinh/laravel-query-logger --dev

To publishes config config/query-logger.php, use command:

php artisan vendor:publish --tag="query-logger"

Usage

To enable log query, set .env file below

QUERY_LOGGER_ENABLED=true

To disable log query, set .env file below

QUERY_LOGGER_ENABLED=false

Test

  • Without Docker
composer test
  • With Docker
make test

Credits