PHP code example of zafarjonovich / yii-telegram-error-handler

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

    

zafarjonovich / yii-telegram-error-handler example snippets




$config = [
 ...
 'components' => [
 ...
	 'errorHandler' => [
		'class' => 'zafarjonovich\YiiTelegramErrorHandler\Web' ,
		'telegram' => [
			'bot_token' => '123456789:ABCKDFHJKSDHKSJHDFKDHF' ,
			'chat_ids' => [123,234,456]
		]
	]

];



$config = [
    ...
    'components' => [
        ...
        'errorHandler' => [
            'class' => 'zafarjonovich\YiiTelegramErrorHandler\Console' ,
            'telegram' => [
                'bot_token' => '123456789:ABCKDFHJKSDHKSJHDFKDHF' ,
                'chat_ids' => [123,234,456]
            ]
        ]

    ];