https://github.com/shetabit/kavenegarsms
Send SMS with Kavengar RESTFUL Api
https://github.com/shetabit/kavenegarsms
kavenegar laravel5 sms sms-api
Last synced: 4 months ago
JSON representation
Send SMS with Kavengar RESTFUL Api
- Host: GitHub
- URL: https://github.com/shetabit/kavenegarsms
- Owner: shetabit
- License: other
- Created: 2019-07-14T06:25:09.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-23T09:25:18.000Z (over 4 years ago)
- Last Synced: 2025-02-01T05:41:17.882Z (4 months ago)
- Topics: kavenegar, laravel5, sms, sms-api
- Language: PHP
- Homepage: https://kavenegar.com/
- Size: 7.81 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# KavenegarSms
Send SMS with kavenegar RESTFUL Api
## InstallationVia Composer
``` bash
$ composer require shetabit/kavenegarsms
```Publish config file
``` bash
php artisan vendor:publish
```## Usage
Send custom message:
```php
$mobile = '0911*******';
$message = 'test message';
$sms = new KavenegarSms;
$result = $sms->send($mobile, $message);
if($result['success']) {
//Send successfully
} else {
//Send failed!
dd($result['message']);
}
```
Send lookup message:
```php
$mobile = '0911*******';
$token1 = rand(1111, 9999);
$token2 = '';
$token3 = '';
$template = 'verify';
$sms = new KavenegarSms;
$result = $sms->lookup($mobile, $token1, $token2, $token3, $template);
if($result['success']) {
//Send successfully
} else {
//Send failed!
dd($result['message']);
}
```
## Testing``` bash
$ composer test
```## Credits
- [Hashem Moghaddari][link-author]
## License
Shetabit. Please see the [license file](license.md) for more information.