2
2
3
3
namespace Overtrue \LaravelWechat ;
4
4
5
- use Illuminate \Support \ServiceProvider as LaravelServiceProvider ;
6
5
use EasyWeChat \Foundation \Application ;
7
6
use Illuminate \Foundation \Application as LaravelApplication ;
7
+ use Illuminate \Support \ServiceProvider as LaravelServiceProvider ;
8
8
use Laravel \Lumen \Application as LumenApplication ;
9
9
10
10
class ServiceProvider extends LaravelServiceProvider
11
11
{
12
12
/**
13
- * 延迟加载
13
+ * 延迟加载.
14
14
*
15
- * @var boolean
15
+ * @var bool
16
16
*/
17
17
protected $ defer = true ;
18
18
@@ -33,11 +33,11 @@ public function boot()
33
33
*/
34
34
protected function setupConfig ()
35
35
{
36
- $ source = realpath (__DIR__ . '/config.php ' );
37
-
36
+ $ source = realpath (__DIR__ . '/config.php ' );
37
+
38
38
if ($ this ->app instanceof LaravelApplication && $ this ->app ->runningInConsole ()) {
39
39
$ this ->publishes ([
40
- $ source => config_path ('wechat.php ' )
40
+ $ source => config_path ('wechat.php ' ),
41
41
]);
42
42
} elseif ($ this ->app instanceof LumenApplication) {
43
43
$ this ->app ->configure ('wechat ' );
@@ -52,7 +52,7 @@ protected function setupConfig()
52
52
*/
53
53
public function register ()
54
54
{
55
- $ this ->app ->singleton (['EasyWeChat \\Foundation \\Application ' => 'wechat ' ], function ($ app ){
55
+ $ this ->app ->singleton (['EasyWeChat \\Foundation \\Application ' => 'wechat ' ], function ($ app ) {
56
56
$ app = new Application (config ('wechat ' ));
57
57
58
58
if (config ('wechat.use_laravel_cache ' )) {
0 commit comments