|
1 |
| -This package allows to send SMS using Textlocal API using laravel notifications |
| 1 | +This package allows to send SMS using Textlocal API using laravel notifications channel textlocal sms |
2 | 2 |
|
3 | 3 | Supports Laravel 5.5 to 9.x
|
4 | 4 |
|
5 |
| -# Found any bugs or improvement open an issue or send me a PR |
6 |
| - |
7 | 5 | [](https://packagist.org/packages/msonowal/laravel-notification-channel-textlocal)
|
8 | 6 | [](https://packagist.org/packages/msonowal/laravel-notification-channel-textlocal)
|
9 | 7 | [](https://packagist.org/packages/msonowal/laravel-notification-channel-textlocal)
|
@@ -35,12 +33,15 @@ Create an account in textlocal then create an API key or hash(password).
|
35 | 33 | ### Setting up the textlocal service
|
36 | 34 |
|
37 | 35 | default config `textlocal.php` update where desired
|
| 36 | + |
| 37 | +Important Either specify a Key OR a Hash - don't enter both! |
| 38 | + |
38 | 39 | ```
|
39 | 40 | return [
|
40 | 41 | 'username' => env('TEXTLOCAL_USERNAME'),
|
41 | 42 | 'password' => env('TEXTLOCAL_PASSWORD'),
|
42 |
| - 'hash' => env('TEXTLOCAL_HASH'), |
43 |
| - 'api_key' => env('TEXTLOCAL_API_KEY'), |
| 43 | + 'hash' => env('TEXTLOCAL_HASH'), //optional if api_key is set |
| 44 | + 'api_key' => env('TEXTLOCAL_API_KEY'), //optional if hash is set |
44 | 45 | 'sender' => env('TEXTLOCAL_SENDER'),
|
45 | 46 | 'request_urls' => [
|
46 | 47 | 'IN' => 'https://api.textlocal.in/',
|
@@ -102,6 +103,12 @@ public function routeNotificationForTextlocal(): array
|
102 | 103 | }
|
103 | 104 | ```
|
104 | 105 |
|
| 106 | +Annoynmous Notifable when say mobile no is not added to a notifiable model you can directly send to mobile no by using that |
| 107 | + |
| 108 | +```php |
| 109 | +Notification::route('Textlocal', $mobileNo')->notify(new VerifyMobileNotification($otp)); |
| 110 | +``` |
| 111 | + |
105 | 112 | ### Available Message methods
|
106 | 113 |
|
107 | 114 | And if you want to have a specific sender based on Notification, e.g. like you are sending promotional notification using one and another for transaction then you can just define this method in your notification class which will return your sender id for that notification only
|
@@ -137,6 +144,8 @@ $ composer test
|
137 | 144 |
|
138 | 145 | If you discover any security related issues, please email [email protected] instead of using the issue tracker.
|
139 | 146 |
|
| 147 | +# Found any bugs or improvement open an issue or send me a PR |
| 148 | + |
140 | 149 | ## Contributing
|
141 | 150 |
|
142 | 151 | Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
|
|
0 commit comments