前提:已经在laravels.php 的 cleaners 中打开了 SessionCleaner 和 AuthCleaner。php
$officialAccount = app(\sprintf('wechat.official_account.%s', $account)); //解决认证没有code的问题,能够参考官方的 https://github.com/hhxsv5/laravel-s/blob/master/KnownIssues-CN.md 使用wechat包的问题 $officialAccount['request'] = $request;
如今能够登录了,可是会出现退出以后再次登录,会提示:code been used。看日志,每次登录使用的是同一个code, 解决方法以下:laravel
修改config/laravels.php在register_providers 中增长 Overtrue\LaravelWeChat\ServiceProvider::classgit
重启laravels 能够再次登录。github