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
Copy file name to clipboardExpand all lines: README.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,22 @@
1
-
# Laravel service provider for MSG91
1
+
# Laravel service provider for Msg91
2
2
3
3
_This library requires a minimum PHP version of 7.1_
4
4
5
-
This is a **[laravel](https://laravel.com) service provider** for [MSG91 APIs](https://docs.msg91.com/collection/msg91-api-integration/5/pages/139). It wraps the [msg91-php][client] client and provides the same functionality for Laravel applications by exposing a Service Provider and Facade.
5
+
This is a **[laravel](https://laravel.com) service provider** for [Msg91 APIs](https://docs.msg91.com/collection/msg91-api-integration/5/pages/139). It wraps the [msg91-php][client] client and provides the same functionality for Laravel applications by exposing a Service Provider and Facade.
6
6
7
7
> **NOTE**: The project is under active development and so, some apis are subjected to change before of `v1.0.0` release.
If you're using Laravel 5.5 or above, the package will automatically register the `Craftsys\MSG91Client\Laravel\MSG91ServiceProvider` provider and aliases `Craftsys\MSG91Client\Laravel\Facade` facade to `MSG91`.
31
+
If you're using Laravel 5.5 or above, the package will automatically register the `Craftsys\Msg91\Msg91LaravelServiceProvider` provider and aliases `Craftsys\Msg91\Facade\Msg91` facade to `Msg91`.
32
32
33
33
### Laravel 5.4 and below
34
34
35
-
Add `Craftsys\MSG91Client\Laravel\MSG91ServiceProvider` to the `providers` array in your `config/app.php`:
35
+
Add `Craftsys\Msg91\Msg91LaravelServiceProvider` to the `providers` array in your `config/app.php`:
@@ -61,7 +61,7 @@ in an example route or in `php artisan tinker` if you are in Laravel.
61
61
62
62
```php
63
63
// this should print an array of some default configuration values
64
-
MSG91::otp()->toArray()
64
+
Msg91::otp()->toArray()
65
65
```
66
66
67
67
If there is an issue, please check the steps again or open an issue for support.
@@ -78,21 +78,21 @@ The package can be configured by providing a `msg91` key inside your `config/ser
78
78
return [
79
79
// along with other services
80
80
"msg91": [
81
-
'key' => env("MSG91_KEY"),
81
+
'key' => env("Msg91_KEY"),
82
82
],
83
83
];
84
84
```
85
85
86
-
and update the `.env` file to get the desired values e.g. `MSG91_KEY`.
86
+
and update the `.env` file to get the desired values e.g. `Msg91_KEY`.
87
87
88
88
Please visit [msg91-php configuration][client-configuration] for a detailed description about the available options and their default values.
89
89
90
90
## Usage
91
91
92
-
Once you have [Configured](#configuration) the Laravel/Lumen application to use the service provider and have aliased the facade to `MSG91`, you will have to [msg91-php][client] client `Craftsys\MSG91\Client`'s instance.
92
+
Once you have [Configured](#configuration) the Laravel/Lumen application to use the service provider and have aliased the facade to `Msg91`, you will have to [msg91-php][client] client `Craftsys\Msg91\Client`'s instance.
93
93
94
94
```php
95
-
MSG91::otp()
95
+
Msg91::otp()
96
96
->to(919999999999)
97
97
->send()
98
98
```
@@ -118,15 +118,15 @@ MGS91::otp()
118
118
### Verify OTP
119
119
120
120
```php
121
-
MSG91::otp(1234) // OTP to be verified
121
+
Msg91::otp(1234) // OTP to be verified
122
122
->to(912343434312) // phone number with country code
123
123
->verify(); // Verify
124
124
```
125
125
126
126
### Resend OTP
127
127
128
128
```php
129
-
MSG91::otp()
129
+
Msg91::otp()
130
130
->to(912343434312) // set the mobile with country code
0 commit comments