Telegram notifications
This is extension for Telegram notifications., (*1)
Docs for yii2 advanced template, (*2)
Installation
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist webstik/yii2-telegram-notifications:dev-master
or add, (*5)
"webstik/yii2-telegram-notifications": "dev-master"
to the require section of your composer.json
file., (*6)
Usage
Module
This extension implements usage of telegram WebHooks. To handle requests
you must configure the module in the backend side with a name of telegramNotifications
as shown below:, (*7)
'modules' => [
'telegramNotifications' => [
'class' => '\webstik\telegramNotifications\Module'
]
],
Migrations
This extension uses DB for saving configuration of telegram bot. You must add configure the console/main.php
file the migrations as shown below:, (*8)
'controllerMap' => [
'migrate-webstik-telegram' => [
'class' => 'yii\console\controllers\MigrateController',
'migrationTable' => 'migration_webstik_telega',
'migrationPath' => '@webstik/telegramNotifications/migrations',
],
],
and then run the console command:, (*9)
php yii migrate-webstik-telegram
UI
After configure you can use web pages for set webhooks, token and pin-code. Just follow the link:, (*10)
/index.php?r=<moduleName>/telegram-setting
, (*11)
or, (*12)
/index.php?r=telegramNotifications/telegram-setting
, (*13)
or, (*14)
/telegramNotifications/telegram-setting
, (*15)
Subscribed users
List of subscribed users will be available by link, (*16)
/telegramNotifications/telegram-users
, (*17)