Download the PHP package trenton93/think-wechat without Composer
On this page you can find all versions of the php package trenton93/think-wechat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package think-wechat
think-wechat
微信SDK For ThinkPHP 6.0 基于w7corp/easywechat
框架要求
ThinkPHP >= 6.0
安装
配置
-
修改配置文件 修改项目根目录下config/wechat.php中对应的参数
- 每个模块基本都支持多账号,默认为 default。
使用
接受普通消息
获得SDK实例
使用facade
以上均支持传入自定义账号:例如
以上均支持传入自定义账号+配置(注:这里的config和配置文件中账号的格式相同):例如
Oauth登录中间件(ThinkPHP6.0+)
使用中间件情况下,config的oauth.callback可以随便写~,反正是直接获取了当前URL
上面的路由定义了 /user 是需要微信授权的,那么在这条路由的回调 或 控制器对应的方法里, 你就可以从 session('wechat_oauth_user_default') 拿到已经授权的用户信息了。
关于ThinkPHP6.0的中间件使用方法不在叙述,详情可以查看官方文档
中间件参数说明
由于ThinkPHP中间件只支持一个参数,所以以:
做分割
支持传入account账号别名以及scope类型
若不传入account
,会使用default
账号
若不传入scope
,会使用配置文件中的oauth.scope
支持一下两种方式
更多 SDK 的具体使用请参考:https://easywechat.com
参考项目
License
MIT
All versions of think-wechat with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.1.0
w7corp/easywechat Version ^5.0
topthink/framework Version ^6.0
psr/simple-cache Version ^1.0
w7corp/easywechat Version ^5.0
topthink/framework Version ^6.0
psr/simple-cache Version ^1.0
The package trenton93/think-wechat contains the following files
Loading the files please wait ....