PHP code example of thanhtaivtt / laravel-telegram-logger

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

    

thanhtaivtt / laravel-telegram-logger example snippets


'telegram' => [
            'driver' => 'custom',
            'via' => \Thanhtaivtt\TelegramLogger\TelegramLogger::class,
            'api_key' => env('TELEGRAM_API_KEY'),
            'chat_id' => env('TELEGRAM_CHAT_ID'),
            'send_log' => env('TELEGRAM_SEND_LOG', false),
        ],

'channels' => [
        'stack' => [
            'driver' => 'stack',
            'channels' => ['daily', 'telegram'],
            'ignore_exceptions' => false,
        ],


'telegram' => [
            'driver' => 'custom',
            'via' => \Thanhtaivtt\TelegramLogger\TelegramLogger::class,
            'api_key' => env('TELEGRAM_API_KEY'),
            'chat_id' => env('TELEGRAM_CHAT_ID'),
            'send_log' => env('APP_ENV') !== 'local',
        ],