bossit / yii2-telegram-logger
There is no license information available for the latest version (1.0.5) of this package.
Push the message in Telegram
Package info
github.com/bossit/yii2-telegram-logger
Type:yii2-extension
pkg:composer/bossit/yii2-telegram-logger
1.0.5
2019-02-18 13:44 UTC
Requires
- php: ^7.0
- longman/telegram-bot: ^0.53.0
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2026-02-19 05:29:48 UTC
README
Push the message in Telegram channel.
Install
The preferred way to install this component is through composer.
$ composer require bossit/yii2-telegram-logger:^1.0
Usage
The preferred way is to setup the components into our Application's configuration array:
'components' => [ 'telegramLogger' => [ 'class' => \bossit\logger\TelegramService::class, 'botKey' => 'xxx:zzz', 'botName' => 'YouNameBot', 'channelId' => '-100xxx' ], ],
That's it, you are ready to use them as Yii2 components.
Send a message to channel:
\Yii::$app->telegramLogger->push('Hello, %username%!');
Send a message with title to channel:
\Yii::$app->telegramLogger->push('Hello, %username%!', 'Authorization');