Skip to content
Log database query sql in Laravel Application, support Guard,Auth to multiple file record
PHP
Branch: master
Clone or download
Latest commit f4373d8 Nov 27, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
src 1. FIX CS Nov 27, 2018
tests 1. FIX CS Nov 27, 2018
.gitignore 1. FIX CS Nov 27, 2018
.php_cs
.travis.yml 1. FIX CS Nov 27, 2018
LICENSE 1. add LICENSE file. Jan 15, 2018
README.cn.md
README.md
composer.json
phpunit.xml 1. FIX CS Nov 27, 2018
scrutinizer.yml 1. FIX CS Nov 27, 2018

README.md

Laravel Database Logger

A simple database logger for Laravel application, support Guard,Auth to multiple file record.

Build Status Build Status Scrutinizer Code Quality Latest Stable Version Latest Unstable Version License

Feature

  1. Log files support anonymous or guard types.
  2. Record auth uesrs.
  3. Record request url
  4. Support record specifying SQL statement(SELECT,INSET INTO,UPDATE,DELETE,ALTER TABLE etc.)
  5. Record slow logs separately.

Installation

composer require ibrand/laravel-database-logger:~1.0 -vvv

Below Laravel5.5 version

In config/app.php 'providers' region add

iBrand\DatabaseLogger\ServiceProvider::class

Publish config file.

php artisan vendor:publish --provider="iBrand\DatabaseLogger\ServiceProvider" 

Usage

Enable in .env or config file.

Set log_queries=>true in config/ibrand/dblogger.php file. or set DB_LOG_QUERIES = true in .env file.

use databaselogger middleware

Route::get('test', 'Controller@index')->middleware('databaselogger');

For more middleware users see the document.

laravel-routing

Preview

snapshot_1515552729718.png snapshot_1515552729719.png snapshot_1515552729720.png

Contributing

If you find any bug or problem please raise the issue here.

You can’t perform that action at this time.