Skip to content

Commit

Permalink
fixed #12
Browse files Browse the repository at this point in the history
  • Loading branch information
qiqizjl committed Feb 12, 2019
1 parent 41e5035 commit f40bd18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Middleware/OauthMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ public function handle(Request $request, \Closure $next, $param = null)
/** @var Application $officialAccount */
$officialAccount = app(\sprintf('wechat.official_account.%s', $account));
if (!$scopes) {
$scopes = config(\sprintf('wechat.official_account.%s.oauth.scopes', $account), ['snsapi_base']);
$scopes = config(\sprintf('wechat.official_account.%s.oauth.scopes', $account));
}
if (!$scopes){
$scopes = ['snsapi_base'];
}
if (is_string($scopes)) {
$scopes = array_map('trim', explode(',', $scopes));
Expand Down

0 comments on commit f40bd18

Please sign in to comment.