pithyone/think-wechat

企业微信SDK for ThinkPHP5

2.0.0 2018-09-08 13:03 UTC

This package is auto-updated.

Last update: 2024-04-09 02:46:04 UTC


README

Latest Stable Version Latest Unstable Version License

think-wechat

企业微信SDK for ThinkPHP5,基于 pithyone/wechat

理论上支持 ThinkPHP 5.1.x 所有版本

安装

composer require pithyone/think-wechat

配置

  1. 创建配置文件

vendor/pithyone/think-wechat/src/config.php 拷贝至应用配置目录,然后重命名为 wework.php

  1. provider.php 绑定类库
return [
    // ...
    'wework' => \think\WeWork::class,
];

用法

以获取 access_token 为例:

app('wework')->get('token')->get();

使用其他应用时,改变默认设置即可,假设有一个测试应用为 test

app('wework', ['test'], true)->get('token')->get();

更多用法请参考:https://pithyone.github.io/wechat/

License

MIT