PHP code example of devskyfly / yii-extension-telegram-target

1. Go to this page and download the library: Download devskyfly/yii-extension-telegram-target 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/ */

    

devskyfly / yii-extension-telegram-target example snippets


'components' = [
    'log' => [
        'targets' => [
        [
            'class' => 'devskyfly\yiiExtensionTelegramTarget\TelegramTarget',
            'chatId' => "",
            'botToken' => "BOT:TOKEN",
            'botUserName' => 'BOTNAME',
            'levels' => ['error', 'warning'],
            'categories' => ['yii\db\*'],
            'except' => [
                    'yii\web\*',
            ],
        ],
        ...
    ]
]