dishcheng/yunxinsms

laravel网易云短信sdk

1.0.1 2018-11-28 15:08 UTC

This package is auto-updated.

Last update: 2020-06-29 06:51:02 UTC


README

For laravel >= 5.5

官方文档

composer require dishcheng/yunxinsms:~1.0

php artisan vendor:publish --provider="DishCheng\YunXinSms\YunXinSmsProvider" --tag=yunxinsms

Usage:

use DishCheng\YunXinSms\YunXinSms;

验证码类短信

$params = ['mobile' => 'xxxxxxx', 'templateid' => 'xxxxxxx', 'authCode' => '1111'];
var_dump(YunXinSms::code_post($params));

通知类短信

$params = ['mobiles' => json_encode([xxxxxxx]), 'templateid' => 'xxxxxxx', 'params' => json_encode([xxxx, xxxx, xxxx])];
$response = YunXinSms::notice_post($params);
var_dump($response);