You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert

168
163
169
-
### Attach a Gif File
164
+
### Attach a GIF File
170
165
171
166
```php
172
167
public function toTelegram($notifiable)
@@ -186,10 +181,9 @@ Preview:
186
181
187
182
### Routing a Message
188
183
189
-
You can either send the notification by providing with the chat id of the recipient to the `to($chatId)` method like shown in the above example or add a `routeNotificationForTelegram()` method in your notifiable model:
184
+
You can either send the notification by providing with the chat ID of the recipient to the `to($chatId)` method like shown in the previous examples or add a `routeNotificationForTelegram()` method in your notifiable model:
190
185
191
186
```php
192
-
...
193
187
/**
194
188
* Route notifications for the Telegram channel.
195
189
*
@@ -199,7 +193,6 @@ public function routeNotificationForTelegram()
199
193
{
200
194
return $this->telegram_user_id;
201
195
}
202
-
...
203
196
```
204
197
205
198
### Handling Response
@@ -208,6 +201,17 @@ You can make use of the [notification events](https://laravel.com/docs/5.8/notif
208
201
209
202
For a complete list of response fields, please refer the Telegram Bot API's [Message object](https://core.telegram.org/bots/api#message) docs.
210
203
204
+
### On-Demand Notifications
205
+
206
+
> Sometimes you may need to send a notification to someone who is not stored as a "user" of your application. Using the `Notification::route` method, you may specify ad-hoc notification routing information before sending the notification. For more details, you can check out the [on-demand notifications](https://laravel.com/docs/5.8/notifications#on-demand-notifications) docs.
207
+
208
+
```php
209
+
use NotificationChannels\Telegram\TelegramChannel;
0 commit comments