putianxin / lumen-ihuyi by putianxin

互亿无线SDK
117
2
2
Package Data
Maintainer Username: putianxin
Maintainer Contact: putianxin@vip.qq.com (ptx)
Package Create Date: 2018-08-22
Package Last Update: 2019-06-20
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-12-23 03:14:40
Package Statistics
Total Downloads: 117
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

lumen-ihuyi

Requirement

  • PHP >= 7.1

安装

$ composer require ptx/lumen-ihuyi"

配置

请在.env中加入以下配置信息或移动并修改config中的文件

'HUYI_APP_ID' => 'XXX',
'HUYI_API_KEY' => 'XXX',

注册服务

lumen:

$app->register(\Ptx\Huyi\HuyiServiceProvider::class);

laravel:

ServiceProvider:

\Ptx\Huyi\HuyiServiceProvider::class

Usage


//$phone_number 多个号码以逗号分隔传入

//短信验证码/通知
Huyi::sms()->content($content)->send($phone_number);

//语音验证码
Huyi::voice()->content($content)->send($phone_number);
//国际短信
Huyi::isms()->content($content)->send($phone_number);
//短信营销
Huyi::yxsms()->content($content)->send($phone_number);
//彩信营销(定时发送) 
Huyi::yxsms()->content($content)->stime($time)->send($phone_number);
//彩信营销
Huyi::mms()->mmsid($mmsid)->pid($pid)->send($phone_number);

License

MIT