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

Installs: 642

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.5 2019-02-18 13:44 UTC

This package is auto-updated.

Last update: 2022-09-18 22:21:03 UTC


README

Push the message in Telegram channel.

Latest Stable Version Build Status Total Downloads

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');