File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,6 @@ public function register()
2626 $ configPath = __DIR__ . '/../config/debugbar.php ' ;
2727 $ this ->mergeConfigFrom ($ configPath , 'debugbar ' );
2828
29- $ this ->loadRoutesFrom (realpath (__DIR__ . '/debugbar-routes.php ' ));
30-
3129 $ this ->app ->alias (
3230 DataFormatter::class,
3331 DataFormatterInterface::class
@@ -90,8 +88,6 @@ public function register($engine, \Closure $resolver)
9088 }
9189 );
9290
93- $ this ->commands (['command.debugbar.clear ' ]);
94-
9591 Collection::macro ('debug ' , function () {
9692 debug ($ this );
9793 return $ this ;
@@ -108,7 +104,13 @@ public function boot()
108104 $ configPath = __DIR__ . '/../config/debugbar.php ' ;
109105 $ this ->publishes ([$ configPath => $ this ->getConfigPath ()], 'config ' );
110106
107+ $ this ->loadRoutesFrom (realpath (__DIR__ . '/debugbar-routes.php ' ));
108+
111109 $ this ->registerMiddleware (InjectDebugbar::class);
110+
111+ if ($ this ->app ->runningInConsole ()) {
112+ $ this ->commands (['command.debugbar.clear ' ]);
113+ }
112114 }
113115
114116 /**
You can’t perform that action at this time.
0 commit comments