2017 © Pedro Peláez
 

library yuntongxun

laravel sms send

image

marlon/yuntongxun

laravel sms send

  • Sunday, November 8, 2015
  • by marlonfan
  • Repository
  • 2 Watchers
  • 4 Stars
  • 54 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

laravelsms

一个依赖于云通讯的laravel短信扩展包, (*1)

使用方法

  • 在composer中引入"marlon/yuntongxun": "0.1.1"
  • 在laravel的app/config/app.php中添加以下内容
    • providers数组中添加'Marlon\Yuntongxun\YuntongxunServiceProvider'
    • aliases数组中添加'Sms' => 'Marlon\Yuntongxun\Yuntongxun'
  • 根据情况执行composer install命令或者composer update命令
  • 在laravel根目录执行php artisan config:publish marlon/yuntongxun
  • app/config/package/yuntongxun/config/config.php设置你的云通讯相关信息

示例代码

<?php
$result = Sms::send($mobile, $info, $id);
/*
 * $mobile 为发送的手机号,为字符串,多个手机号用逗号分隔
 * $info 为发送的验证码以及有效时间,为数组
 * $id 为要发送的模板id
 * Sms::send会有返回值,为数组形式
 * return Array(
 *     'to' => '18635634441',   发送的手机号
 *     'status' => '0'          状态码,状态码为0的情况下为发送成功
 * )
 */

NOTICE

恩. 很久没有更新,今天正式说下,停止更新了. 主要原因还是因为这个东西只针对一个短信服务商. 刚刚自己又测了下,目前还是可以用的., (*2)

The Versions

08/11 2015

dev-master

9999999-dev

laravel sms send

  Sources   Download

The Requires

 

by Avatar marlonfan

04/01 2015

0.1.1

0.1.1.0

laravel sms send

  Sources   Download

The Requires

 

by Avatar marlonfan

04/01 2015

0.1.0

0.1.0.0

laravel sms send

  Sources   Download

The Requires

 

by Avatar marlonfan