PHP code example of bri4n0 / sql-query-log

1. Go to this page and download the library: Download bri4n0/sql-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/ */

    

bri4n0 / sql-query-log example snippets


// config/app.php
'providers' => [
    ...
    Bri4n0\SqlQueryLog\DataBaseQueryServiceProvider::class,
];

// bootstrap/providers.php
return [
    ...
    Bri4n0\SqlQueryLog\DataBaseQueryServiceProvider::class,
];

    'channels' => [
    ...,
     'sql-query-log' => [
            'driver'               => 'daily',
            'path'                 => storage_path('logs/queries.log'),
            'days'                 => env('LOG_DAILY_DAYS', 14),
            'replace_placeholders' => true,
        ],
    ]
bash
SQL_LOG_LEVEL=debug