File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,32 @@ class AccountApproved extends Notification
131
131
}
132
132
```
133
133
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
+
134
160
Or create a Twilio call:
135
161
136
162
``` php
You can’t perform that action at this time.
0 commit comments