Skip to content

Commit 19204f3

Browse files
authored
feat(docs): update docs to include basic examples
1 parent e0eda73 commit 19204f3

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,34 @@ Please visit [msg91-php configuration][client-configuration] for a detailed desc
103103
Once you have [Configured](#configuration) the Laravel/Lumen application to use the service provider and have aliased the facade to `Msg91`, you will have a [msg91-php][client] client (Craftsys\Msg91\Client) instance.
104104

105105
```php
106-
Msg91::otp()
107-
->to(919999999999)
108-
->send()
106+
// send otp
107+
Msg91::otp()->to(919999999999)->send();
108+
109+
// resend otp
110+
Msg91::otp()->to(919999999999)->viaVoice()->resend();
111+
112+
// verify otp
113+
Msg91::otp(678612)->to(919999999999)->verify();
114+
115+
// send sms
116+
Msg91::sms()->to(919999999999)->flow('<flow_id>')->send();
117+
118+
// in bulk
119+
Msg91::sms()->to([919999999999, 918899898990])->flow('<flow_id>')->send();
120+
121+
// with variables in your flow template
122+
Msg91::sms()->to([919999999999, 918899898990])->flow('<flow_id>')->variable('variable_name', 'value')->send();
123+
124+
// with variables per recipient
125+
Msg91::sms()->recipients([
126+
['mobiles' => 919999999999, 'name' => 'Sudhir M'],
127+
['mobiles' => 918899898990, 'name' => 'Craft Sys']
128+
])
129+
->flow('<flow_id>')
130+
->send();
109131
```
110132

111-
Next, follow along with [examples](#examples) to learn more
133+
Follow along with [examples](#examples) to learn more
112134

113135
## Examples
114136

0 commit comments

Comments
 (0)