File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 22
33All notable changes to the ` Twitter notification channel ` will be documented in this file
44
5+ ## 0.0.11 - 2016-11-08
6+
7+ - refactor Twitter status updates image handling
8+
59## 0.0.5 - 2016-09-17
610
711- refactor the code to provide separate classes for Twitter status updates and direct messages
Original file line number Diff line number Diff line change @@ -102,16 +102,20 @@ public function toTwitter($notifiable) {
102102}
103103````
104104### Publish Twitter status update with images
105- It is possible to publish images with your status update too. You just have to pass the image paths as the second
106- parameter. These images will then be shown next to your Twitter status message .
105+ It is possible to publish images with your status update too. You just have to pass the image path to the ` withImage `
106+ method .
107107```` php
108108public function toTwitter($notifiable) {
109- return new TwitterStatusUpdate(
110- 'Laravel notifications are awesome!',
111- [public_path('marcel.png'), public_path('mohamed.png'), public_path('freek.png')]
112- );
109+ return (new TwitterStatusUpdate('Laravel notifications are awesom!'))->withImage('marcel.png');
113110}
114111````
112+ If you want to use multiple images, just pass an array of paths.
113+ ```` php
114+ return (new TwitterStatusUpdate('Laravel notifications are awesom!'))->withImage([
115+ public_path('marcel.png'),
116+ public_path('mohamed.png')
117+ ]);
118+ ````
115119### Send a direct message
116120To send a Twitter direct message to a specific user, you will need the ` TwitterDirectMessage ` class. Provide the Twitter
117121user handler as the first parameter and the the message as the second one.
You can’t perform that action at this time.
0 commit comments