PHP code example of mwazovzky / laravel-database-logger
1. Go to this page and download the library: Download mwazovzky/laravel-database-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/ */
mwazovzky / laravel-database-logger example snippets
return [
// ...
'channels' => [
// ...
// Custom Database Logger
'database' => [
'driver' => 'custom',
'via' => MWazovzky\DatabaseLogger\CreateDatabaseLogger::class,
],
],
];
use Illuminate\Support\Facades\Log;
...
Log::channel('database')->log('error', 'some-message', ['foo' => 'bar']);
$ php artisan vendor:publish --tag=migrations --force
$ php artisan migrate