arui/tc-captcha
最新稳定版本:1.4
Composer 安装命令:
composer require arui/tc-captcha
包简介
sdk for QQ Cloud Catcha Service
README 文档
README
A Simple SDK for Tencent Cloud Captcha
Installation
Package is available on Packagist, you can install it using Composer.
composer require arui/tc-captcha
Dependencies
- PHP 7.0+
- OpenSSL Extension
- Laravel 6+
Parameter setting
php artisan vendor publish --provider="Arui\TcCaptcha\TcCaptchaProvider"
.env
QQ_CAPTCHA_SECRET_ID=
QQ_CAPTCHA_SECRET_KEY=
QQ_CAPTCHA_SECRET_APPID=
QQ_CAPTCHA_SECRET_APPKEY=
How to use
use Arui\TcCaptcha\Facades\TcCaptchaFacade;
try {
$res = TcCaptchaFacade::DescribeCaptchaResult($request->ticket, $request->randstr, Utils::getIp());
if($res !== true){
throw new \Exception($res);
}
} catch (\Exception $e) {
$response = ['message' => $e->getMessage(),'code' => 430];
return response()->json($response);
}
统计信息
- 总下载量: 82
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-25