mahdimajidzadeh / kavenegar
Laravel package for Kavenegar sms
v1.0.1
2021-07-11 12:05 UTC
Requires
- php: ~5.6|>=7.0
- guzzlehttp/guzzle: >=6.0
- illuminate/support: >=5.5
README
Install
Via Composer
$ composer require mahdimajidzadeh/kavenegar
If you do not run Laravel 5.5 (or higher), then add the service provider in config/app.php:
MahdiMajidzadeh\Kavenegar\KavenegarServiceProvider:class
If you do run the package on Laravel 5.5+, package auto-discovery takes care of the magic of adding the service provider.
You must publish the configuration to provide an own service provider stub.
$ php artisan vendor:publish --provider="MahdiMajidzadeh\kavenegar\KavenegarServiceProvider"
Usage
See documention for params and others at kavenegar docs
$sms = new KavenegarSMS(); $result = $sms->send($receptor, $message); $sms->status; // like 200 $sms->message; // like "تایید شد"
All available methods:
$sms = new KavenegarSMS(); $sms->send(...); $sms->sendArray(...); $sms->status(...); $sms->statusLocalMessageid(...); $sms->select(...); $sms->selectOutbox(...); $sms->latestOutbox(...); $sms->countOutbox(...); $sms->cancel(...); $sms->countInbox(...); $sms->receive(...); $sms->countPostalcode(...); $sms->sendByPostalcode(...); $verify = new KavenegarVerify(); $verify->lookup(...);
Change log
Please see CHANGELOG for more information on what has changed recently.