2017 © Pedro Peláez
 

library query_notice

In laravel,When you listen sql query and notice your by email.You can use this repository.

image

bugslife/query_notice

In laravel,When you listen sql query and notice your by email.You can use this repository.

  • Tuesday, March 27, 2018
  • by bugslife
  • Repository
  • 1 Watchers
  • 3 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 8 % Grown

The README.md

query_notice

In laravel,When you listen sql query and notice your by email.You can use this repository., (*1)

Installation

composer require bugslife/query_notice

Provider

BugsLife\QueryNotice\Providers\QueryNoticeProvider::class,

Resource & Config

php artisan vendor:publish --tag=queryNotice

Usage

You can use it in the entire project, or use the middleware locally.Support log query or email to relevant developers., (*2)

Use it in the entire project.Set config/queryNotice.php.default is close.

    /*
     * Open all object.
     */
    'is_all_object' => true,

Use the middleware locally.Set app\Http\Kernel.php.and use it.

    protected $routeMiddleware = [
        ...
        'query_notice' => \BugsLife\QueryNotice\Middleware\QueryMiddleware::class,
    ];

Write notice in log.Set config/queryNotice.php.default is open.

    /*
     * Set notice type open state. true equal open.
     */
    'notice_type_state' => [
        'log' => true,
        'mail' => false,
        'db' => false,
    ],

Write notice in log.When sql query run time is not greater than max time.Don't write in log? true is write.Set config/queryNotice.php.default is open.

    /*
     * When sql query run time is not greater than max time.Don't write in log? true is write.
     */
    'is_filter_log' => true,

Notice in users email.Set config/queryNotice.php.default is close.

    /*
     * Set notice type open state. true equal open.
     */
    'notice_type_state' => [
        'log' => true,
        'mail' => true,
        'db' => false,
    ],

Extend your notice type

You can extends "BugsLife\QueryNotice\Format\Format.php" and write function run().Set your format in "config\queryNotice.php".

Demo, (*3)

use BugsLife\QueryNotice\Format\Format;

class DatabaseFormat extends Format
{

    /**
     * Start use this format notice sql query.
     * @param $notice
     * @return mixed
     */
    public function run($notice)
    {
        // TODO: Implement run() method.
    }
    /*
     * Extend notice type.
     */
    'extend_notice_type' => [
        //Base format.This is demo.
        ...
        'db' => \Facades\BugsLife\QueryNotice\Format\Database\DatabaseFormat::class,
    ],


set Switch
/* * Set notice type open state. true equal open. */ 'notice_type_state' => [ 'log' => true, 'mail' => true, 'db' => true, ],

Feature

1.Write in database., (*4)

The Versions

27/03 2018

dev-dev

dev-dev

In laravel,When you listen sql query and notice your by email.You can use this repository.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

  • php >=7.0.0

by Blue

27/03 2018

1.0.2

1.0.2.0

In laravel,When you listen sql query and notice your by email.You can use this repository.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

  • php >=7.0.0

by Blue

05/03 2018

dev-master

9999999-dev

In laravel,When you listen sql query and notice your by email.You can use this repository.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

  • php >=7.0.0

by Blue

05/03 2018

1.0.1

1.0.1.0

In laravel,When you listen sql query and notice your by email.You can use this repository.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

  • php >=7.0.0

by Blue

03/03 2018

1.0.0

1.0.0.0

In laravel,When you listen sql query and notice your by email.You can use this repository.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

  • php >=7.0.0

by Blue