https://github.com/pithyone/think-wechat
企业微信SDK for ThinkPHP5
https://github.com/pithyone/think-wechat
sdk thinkphp wechat
Last synced: 15 days ago
JSON representation
企业微信SDK for ThinkPHP5
- Host: GitHub
- URL: https://github.com/pithyone/think-wechat
- Owner: pithyone
- License: mit
- Created: 2017-07-30T06:00:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-03-02T16:40:58.000Z (almost 5 years ago)
- Last Synced: 2025-10-02T13:13:35.797Z (4 months ago)
- Topics: sdk, thinkphp, wechat
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 49
- Watchers: 3
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://packagist.org/packages/pithyone/think-wechat)
[](https://packagist.org/packages/pithyone/think-wechat)
[](https://packagist.org/packages/pithyone/think-wechat)
# think-wechat
企业微信SDK for ThinkPHP5,基于 [pithyone/wechat](https://github.com/pithyone/wechat)
> 理论上支持 ThinkPHP 5.1.x 所有版本
## 安装
``` bash
composer require pithyone/think-wechat
```
## 配置
1. 创建配置文件
将 `vendor/pithyone/think-wechat/src/config.php` 拷贝至应用配置目录,然后重命名为 `wework.php`
2. 在 `provider.php` 绑定类库
```php
return [
// ...
'wework' => \think\WeWork::class,
];
```
## 用法
以获取 access_token 为例:
```php
app('wework')->get('token')->get();
```
使用其他应用时,改变默认设置即可,假设有一个测试应用为 `test`
```php
app('wework', ['test'], true)->get('token')->get();
```
更多用法请参考:https://pithyone.github.io/wechat/
## License
[MIT](https://github.com/pithyone/think-wechat/blob/master/LICENSE)