PHP code example of revangelista / telegram-logger

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

    

revangelista / telegram-logger example snippets


'telegram' => [
    'driver'  => 'custom',
    'via'     => Logger\TelegramLogger::class,
    'level'   => 'debug',
    'token'   => '<YOUR_BOT_TOKEN>',
    'chat_id' => '<CHAT_ID>',
]

'telegram' => [
    'driver'  => 'custom',
    'via'     => Logger\TelegramLogger::class,
    'level'   => 'debug',
    'token'   => '<YOUR_BOT_TOKEN>',
    'chat_id' => [
        '<CHAT_ID_1>',
        '<CHAT_ID_2>',
        '<CHAT_ID_3>'
    ]
]

'stack' => [
    'driver' => 'stack',
    'channels' => ['single', 'telegram'],
]

LOG_CHANNEL=telegram