Looking to hire Laravel developers? Try LaraJobs

laravel-ctwing maintained by hiworld

Description
CTWing Api for Laravel
Author
Last update
2024/11/09 05:42 (dev-master)
License
Links
Downloads
13

Comments
comments powered by Disqus

CTwing for Laravel

目前只完成了设备列表和下发指令的功能

框架要求

  • Laravel >=10.0

安装

composer require hiworld/laravel-ctwing

配置

php artisan vendor:publish --provider="Hiworld\\CTWing\\CTWingServiceProvider"

.env 文件

CTWING_BASE_URL=
CTWING_TIME_URL=
CTWING_APP_KEY=
CTWING_APP_SECRET=
CTWING_MASTER_KEY=

使用

DeviceManagement使用:

use Hiworld\CTWing\AepWork;

$productId = '';
$app = AepWork::DeviceManagement();
$app->QueryDeviceList($productId)

DeviceCommand使用:

use Hiworld\CTWing\AepWork;

$body = [];
$app = AepWork::DeviceCommand();
$response = $app->CreateCommand($body)

LICENSE

MIT