项目作者: MahdiMajidzadeh

项目描述 :
Laravel wrapper for Kavenegar sms service
高级语言: PHP
项目地址: git://github.com/MahdiMajidzadeh/laravel-kavenegar.git
创建时间: 2017-11-12T23:21:40Z
项目社区:https://github.com/MahdiMajidzadeh/laravel-kavenegar

开源协议:MIT License

下载


Laravel Kavenegar

StyleCI
packagist
status

Install

Via Composer

  1. $ composer require mahdimajidzadeh/kavenegar

If you do not run Laravel 5.5 (or higher), then add the service provider in config/app.php:

  1. 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.

  1. $ php artisan vendor:publish --provider="MahdiMajidzadeh\kavenegar\KavenegarServiceProvider"

Usage

See documention for params and others at kavenegar docs

  1. $sms = new KavenegarSMS();
  2. $result = $sms->send($receptor, $message);
  3. $sms->status; // like 200
  4. $sms->message; // like "تایید شد"

All available methods:

  1. $sms = new KavenegarSMS();
  2. $sms->send(...);
  3. $sms->sendArray(...);
  4. $sms->status(...);
  5. $sms->statusLocalMessageid(...);
  6. $sms->select(...);
  7. $sms->selectOutbox(...);
  8. $sms->latestOutbox(...);
  9. $sms->countOutbox(...);
  10. $sms->cancel(...);
  11. $sms->countInbox(...);
  12. $sms->receive(...);
  13. $sms->countPostalcode(...);
  14. $sms->sendByPostalcode(...);
  15. $verify = new KavenegarVerify();
  16. $verify->lookup(...);

Change log

Please see CHANGELOG for more information on what has changed recently.