shetabit / kavenegarsms
Send SMS with Kavenegar RESTFUL Api
V1.2
2021-01-23 08:15 UTC
Requires
- illuminate/support: ^5|^6|^7|^8
- kavenegar/php: *
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~7.0
- sempro/phpunit-pretty-print: ^1.0
This package is auto-updated.
Last update: 2024-10-23 18:04:52 UTC
README
Send SMS with kavenegar RESTFUL Api
Installation
Via Composer
$ composer require shetabit/kavenegarsms
Publish config file
php artisan vendor:publish
Usage
Send custom message:
$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:
$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
$ composer test
Credits
- [Hashem Moghaddari][link-author]
License
Shetabit. Please see the license file for more information.