You can install the package via composer:
composer require reaimagine/laravel-cek
If you are using Laravel 5.5 or later, the service provider will automatically be discovered.
On earlier versions, you need to do that manually. You must install the service provider:
// config/app.php
'providers' => [
...
Reaimagine\LaravelCek\LaravelCekServiceProvider::class
];
You can then publish the configuration file:
php artisan vendor:publish --provider "Reaimagine\LaravelCek\LaravelCekServiceProvider"
You must add a new channel to your config/logging.php
file:
// config/logging.php
'channels' => [
//...
'laravel-cek' => [
'driver' => 'custom',
'via' => Reaimagine\LaravelCek\Logger::class,
'level' => 'debug',
],
];
Add the channel to the stack in the config/logging.php
configuration:
// config/logging.php
'channels' => [
//...
'stack' => [
'driver' => 'stack',
'channels' => ['single', 'laravel-cek'],
],
];
Then make sure the logging channel is set to stack in your .env
file:
LOG_CHANNEL=stack