yadjet / yii2-wechat
overtrue 为 Yii2 开发的微信 SDK
dev-master
2015-09-14 08:15 UTC
Requires
- php: >=5.4
- overtrue/wechat: 2.*
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-09-10 19:52:10 UTC
README
基于 overtrue/wechat 扩展的 Yii2 微信接口整合
安装
使用 composer,在命令行下使用以下命令:
composer require "yadjet/yii2-wechat:dev-master"
#使用
- 在您的应用配置文件中包含以下设置:
'wechat' => [ 'class' => '\yadjet\wechat\Wechat', 'config' => [ 'appId' => 'youAppId', 'appSecret' => 'youAppSecret', ] ],
- 示例代码
class TestController extends \yii\web\Controller { $userService = Yii::$app->wechat->getService('user'); $users = $userService->get(); var_dump($users); }
关于 Wechat SDK 的详细使用方法,请参阅 overtrue/wechat 使用手册