2017 © Pedro Peláez
 

library alisms

a sms library for thinkphp5

image

leolei/alisms

a sms library for thinkphp5

  • Sunday, May 28, 2017
  • by lgb531
  • Repository
  • 0 Watchers
  • 0 Stars
  • 39 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

阿里大鱼短信库 ThinkPHP5 (重新修改版)

安装方法

composer require leolei/alisms

类库使用的命名空间为\\leolei\\Alisms, (*1)

配置说明

ThinkPHP5格式用法, (*2)

<?php

return [
    'alidayu' =>[
        'app_key'=>'',
        'app_secret'=>'',
        'signature'=>'',
    ]
];

使用ThinkPHP5配置格式进行加载, (*3)

典型用法

以ThinkPHP5为例, (*4)

<?php

namespace app\common\service;

use leolei\Alisms\SmsGateWay;

class Sms {

    public function send_code($mobile) {
        $code = mt_rand(1000, 9999);
        $AliSMS = new SmsGateWay();
        $AliSMS->send($mobile, ['code'=>$code], 'SMS_10210103');
    }

}

The Versions

28/05 2017

1.0.0

1.0.0.0

a sms library for thinkphp5

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by leolei

28/05 2017

dev-master

9999999-dev

a sms library for thinkphp5

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by leolei