File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ This package makes it easy to send Telegram notification using [Telegram Bot API
1313
1414- [ Installation] ( #installation )
1515 - [ Setting up your Telegram bot] ( #setting-up-your-telegram-bot )
16+ - [ Using in Lumen] ( #using-in-lumen )
17+ - [ Proxy or Bridge Support] ( #proxy-or-bridge-support )
1618- [ Usage] ( #usage )
1719 - [ Text Notification] ( #text-notification )
1820 - [ Attach a Photo] ( #attach-a-photo )
@@ -49,13 +51,29 @@ Talk to [@BotFather](https://core.telegram.org/bots#6-botfather) and generate a
4951Then, configure your Telegram Bot API Token:
5052
5153``` php
52- // config/services.php
54+ # config/services.php
55+
5356'telegram-bot-api' => [
5457 'token' => env('TELEGRAM_BOT_TOKEN', 'YOUR BOT TOKEN HERE')
5558],
5659```
5760
58- #### (Optional) Proxy or Bridge Support
61+ ## Using in Lumen
62+
63+ If you're using this notification channel in your Lumen project, you will have to add the below code in your ` bootstap/app.php ` file.
64+
65+ ``` php
66+ # bootstrap/app.php
67+
68+ // Make sure to create a "config/services.php" file and add the config from the above step.
69+ $app->configure('services');
70+
71+ # Register the notification service providers.
72+ $app->register(Illuminate\Notifications\NotificationServiceProvider::class);
73+ $app->register(NotificationChannels\Telegram\TelegramServiceProvider::class);
74+ ```
75+
76+ ## Proxy or Bridge Support
5977
6078You may not be able to send notifications if Telegram Bot API is not accessible in your country,
6179you can either set a proxy by following the instructions [ here] ( http://docs.guzzlephp.org/en/stable/quickstart.html#environment-variables ) or
You can’t perform that action at this time.
0 commit comments