File tree Expand file tree Collapse file tree 2 files changed +16
-24
lines changed Expand file tree Collapse file tree 2 files changed +16
-24
lines changed Original file line number Diff line number Diff line change 60
60
61
61
'capture_ajax ' => true ,
62
62
63
- /*
64
- |--------------------------------------------------------------------------
65
- | Capture Console Commands
66
- |--------------------------------------------------------------------------
67
- |
68
- | The Debugbar can listen to Artisan commands. You can view them with the browse button in the Debugbar.
69
- |
70
- */
71
-
72
- 'capture_console ' => false ,
73
-
74
63
/*
75
64
|--------------------------------------------------------------------------
76
65
| DataCollectors
Original file line number Diff line number Diff line change @@ -18,14 +18,12 @@ public function boot()
18
18
{
19
19
$ app = $ this ->app ;
20
20
21
- if (!$ app ->runningInConsole ()) {
22
- $ app ['router ' ]->after (
23
- function ($ request , $ response ) use ($ app ) {
24
- /** @var LaravelDebugbar $debugbar */
25
- $ debugbar = $ app ['debugbar ' ];
26
- $ debugbar ->modifyResponse ($ request , $ response );
27
- }
28
- );
21
+ if ($ app ->runningInConsole ()) {
22
+ $ this ->app ['config ' ]->set ('debugbar.enabled ' , false );
23
+ }
24
+
25
+ if (! $ this ->app ['config ' ]->get ('debugbar.enabled ' )) {
26
+ return ;
29
27
}
30
28
31
29
$ routeConfig = [
@@ -49,11 +47,16 @@ function ($request, $response) use ($app) {
49
47
]);
50
48
});
51
49
52
- if ($ this ->app ['config ' ]->get ('debugbar.enabled ' )) {
53
- /** @var LaravelDebugbar $debugbar */
54
- $ debugbar = $ this ->app ['debugbar ' ];
55
- $ debugbar ->boot ();
56
- }
50
+ /** @var LaravelDebugbar $debugbar */
51
+ $ debugbar = $ this ->app ['debugbar ' ];
52
+ $ debugbar ->boot ();
53
+
54
+ $ app ['router ' ]->after (
55
+ function ($ request , $ response ) use ($ debugbar ) {
56
+ $ debugbar ->modifyResponse ($ request , $ response );
57
+ }
58
+ );
59
+
57
60
}
58
61
59
62
/**
You can’t perform that action at this time.
0 commit comments