介绍
本项目是集成了各大云服务厂商的短信业务平台,支持ThinkPHP5.0、ThinkPHP5.1和ThinkPHP6.0,由宁波晟嘉网络科技有限公司维护,目前支持阿里云、腾讯云、七牛云、又拍云、Ucloud和华为云,您如果有其他厂商的集成需求,请通过邮件联系作者提交需求。
安装教程
使用 composer require singka/singka-sms
命令行安装即可。
安装完成后会自动生成 config/sms.php
配置文件,内容如下:
<?php
// +----------------------------------------------------------------------
// | 胜家云 [ SingKa Cloud ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2020 https://www.singka.net All rights reserved.
// +----------------------------------------------------------------------
// | 宁波晟嘉网络科技有限公司
// +----------------------------------------------------------------------
// | Author: ShyComet <shycomet@qq.com>
// +----------------------------------------------------------------------
return [
'aliyun' => [
'version' => '2017-05-25',
'host' => 'dysmsapi.aliyuncs.com',
'scheme' => 'http',
'region_id' => 'cn-hangzhou',
'access_key' => '',
'access_secret' => '',
'sign_name' => '',
'actions' => [
'register' => [
'actions_name' => '注册验证',
'template_id' => 'SMS_53115055',
],
'login' => [
'actions_name' => '登录验证',
'template_id' => 'SMS_53115057',
],
'changePassword' => [
'actions_name' => '修改密码',
'template_id' => 'SMS_53115053',
],
'changeUserinfo' => [
'actions_name' => '变更信息',
'template_id' => 'SMS_53115052',
],
],
],
'ucloud' => [
'public_key' => '',
'private_key' => '',
'project_id' => '',
'base_url' => 'https://api.ucloud.cn',
'sign_name' => '',
'actions' => [
'register' => [
'actions_name' => '注册验证'