https://github.com/zhan3333/tencentcloudapi
Tencent cloud api
https://github.com/zhan3333/tencentcloudapi
Last synced: 8 months ago
JSON representation
Tencent cloud api
- Host: GitHub
- URL: https://github.com/zhan3333/tencentcloudapi
- Owner: zhan3333
- Created: 2019-12-26T01:17:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-26T03:09:45.000Z (over 6 years ago)
- Last Synced: 2025-08-24T15:12:36.702Z (10 months ago)
- Language: PHP
- Size: 12.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 腾讯云api Laravel 版本
## 安装
`composer require zhan3333/tencentcloudapi`
## 配置
`.env`配置
```env
TENCENT_SECRET_ID=
TENCENT_SECRET_KEY=
```
## 使用
```php
use Zhan3333\Tencent\OCR;
use Zhan3333\Tencent\Request\OCRIdCardRequest;
use Zhan3333\Tencent\Response\OCRIdCardResponse;
$filePath = __DIR__ . '/files/id-card-front.jpg';
$request = new OCRIdCardRequest($filePath, OCRIdCardRequest::SIDE_FRONT);
/** @var OCRIdCardResponse $response */
$response = app(OCR::class)->execute($request);
dump($response);
dump($response->card);
dump($response->error_message);
dump($response->card->id_card_number);
```