firstphp/dingtalk

钉钉开发组件 for hyperf

1.2.2 2019-09-19 08:17 UTC

This package is not auto-updated.

Last update: 2020-05-23 12:20:57 UTC


README

钉钉开发组件 for hyperf

安装组件:

composer require firstphp/dingtalk

发布配置:

php bin/hyperf.php vendor:publish firstphp/dingtalk

或

cp vendor/firstphp/dingtalk/src/publish/dingtalk.php config/autoload

编辑.env配置:

DINGTALK_URL=https://oapi.dingtalk.com/
DINGTALK_APPID=dingoavde8e9au3bzeoaew
DINGTALK_APPSECRET=l03242xmoe3YBnQVgaVbxKRPVxNHdFIg6YjkY0qowDtnhuqdqRwS3D9OXAU3G4mX

示例代码:

use Firstphp\Dingtalk\DingtalkInterface;

......

/**
 * @Inject
 * @var DingtalkInterface
 */
protected $dingtalkInterface;

public function test() {
    $res = $this->dingtalkInterface->gettoken();
    var_dump($res);
}