/** * Bootstrap the application services. */ public function boot(AccountService $account) { $this->app->singleton('easywechat', function () use($account) { $options = $account->getWechatOptions(); return new \EasyWeChat\Foundation\Application($options); }); // 开放平台授权相关服务 $this->app->singleton('openauth', function () { return new \App\Services\OpenAuth(); }); }