Skip to content

Commit f5e834a

Browse files
committed
Added documentation
1 parent 1c7dcbb commit f5e834a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,32 @@ class AccountApproved extends Notification
131131
}
132132
```
133133

134+
You can also send using Content Templates:
135+
136+
``` php
137+
use NotificationChannels\Twilio\TwilioChannel;
138+
use NotificationChannels\Twilio\TwilioContentTemplateMessage;
139+
use Illuminate\Notifications\Notification;
140+
141+
class AccountApproved extends Notification
142+
{
143+
public function via($notifiable)
144+
{
145+
return [TwilioChannel::class];
146+
}
147+
148+
public function toTwilio($notifiable)
149+
{
150+
return (new TwilioContentTemplateMessage())
151+
->contentSid("HXXXXXXXXXXXXXXXXXXXXXXXX")
152+
->contentVariables([
153+
'1' => 'John Doe',
154+
'2' => 'ACME Inc.',
155+
]);
156+
}
157+
}
158+
```
159+
134160
Or create a Twilio call:
135161

136162
``` php

0 commit comments

Comments
 (0)