PHP code example of rhyslees / log-channel-laravel

1. Go to this page and download the library: Download rhyslees/log-channel-laravel 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/ */

    

rhyslees / log-channel-laravel example snippets


'channels' => [
    ...
    
    'logchannel' => [
        'driver' => 'custom',
        'via' => \RhysLees\LogChannelLaravel\LogChannelLaravel::class,
        'key' => env('LOG_CHANNEL_KEY', ''),
        'app_id' => env('LOG_CHANNEL_APP_ID', ''),
        'endpoint' => env('LOG_CHANNEL_ENDPOINT', 'https://logchannel.co.uk/api/app'),
    ],
    
    ...
],

'stack' => [
    'driver' => 'stack',
    'channels' => ['single', 'logchannel'],
    'ignore_exceptions' => false,
],

return [
    'key' => env('LOG_CHANNEL_KEY', ''),
    'app_id' => env('LOG_CHANNEL_APP_ID', ''),
    'endpoint' => env('LOG_CHANNEL_ENDPOINT', 'https://logchannel.co.uk/api/app'),
];

$logChannelLaravel = new RhysLees\LogChannelLaravel();
echo $logChannelLaravel->echoPhrase('Hello, RhysLees!');
bash
php artisan vendor:publish --tag="log-channel-laravel-config"
bash
php artisan vendor:publish --tag="log-channel-laravel-views"