PHP code example of dipenparmar12 / laravel-query-log

1. Go to this page and download the library: Download dipenparmar12/laravel-query-log library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dipenparmar12 / laravel-query-log example snippets




return [

    /*
    |--------------------------------------------------------------------------
    | Default Log Channels
    |--------------------------------------------------------------------------
    |
    | Here you may configure the log channels for query log.
    | This option defines the default log channel that gets used when writing
    | Query to the logs. The name specified in this option should match
    | one of the channels defined in the  `config/logging.php` "channels" configuration array.
    | You can define multiple channels seprated by comman (,) for query log.
    | 
    */

    'log_chhanels' =>  env('QUERY_LOG_CHHANELS', null),

    /*
    |--------------------------------------------------------------------------
    | To disable or enable the general query log.
    |--------------------------------------------------------------------------
    |
    | This option use to disable or enable the general query log,
    | Out of the box, Laravel uses the Monolog PHP logging library. 
    | This gives you a variety of powerful log handlers / formatters 
    | to utilize.
    |
    */

    'query_log_enable' => env('QUERY_LOG_ENABLE', true),

];
dotenv
QUERY_LOG_ENABLE=false
config/logging.php