dishcheng / yunxinsms
laravel网易云短信sdk
1.0.1
2018-11-28 15:08 UTC
Requires
- php: >=7.0.0
- laravel/framework: >=5.5
This package is auto-updated.
Last update: 2024-10-29 06:05:32 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);