- PHP >= 7.0
- Composer
- openssl 拓展
- 支持 >TP5.* + ; Laravel6.* +
$ composer require ykxiao/cloud-wh-api-sdk
<?php
use CloudWhDemu\HttpClient;
$options = new CloudMonth([
"default" => [
'enabled' => true,
'token' => "you-push-token",
'timeout' => 2.0,
'ssl_verify' => true,
'secret' => '',
]
]);
$res = $options->text('Text Service SDK', 'send');
dump($res);
#成功安装后执行:
php artisan vendor:publish --provider="CloudWhDemu\HttpServiceProvider"
#会自动将cloud.php添加到您项目的配置文件当中
$res = cloud()->text('Test Service SDK', 'send');
dump($res);
CLOUD_WH_ENABLED=true #(可选)默认为开启
CLOUD_WH_TIME_OUT= #超时时间
CLOUD_WH_SSL_VERIFY=false #是否开启SSL验证
CLOUD_WH_SECRET= #安全配置
MIT