PHP code example of itelmenko / laravel-mysql-logger
1. Go to this page and download the library: Download itelmenko/laravel-mysql-logger 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/ */
itelmenko / laravel-mysql-logger example snippets
// [...]
'channels' => [
// [...]
'mysql' => [
'driver' => 'custom',
'via' => ITelmenko\Logger\Laravel\Logging\MySQLLogger::class,
'connection' => env('DB_LOG_CONNECTION'),
'table' => env('DB_LOG_TABLE'),
'name' => 'my.channel' // optional
],
],
Log::channel('mysql')->info('Something happened!');