@@ -102,7 +102,6 @@ public function boot()
102
102
103
103
$ this ->loadRoutesFrom (__DIR__ . '/debugbar-routes.php ' );
104
104
105
- $ this ->registerResponseListener ();
106
105
$ this ->registerMiddleware (InjectDebugbar::class);
107
106
108
107
$ this ->commands (['command.debugbar.clear ' ]);
@@ -128,16 +127,6 @@ protected function getConfigPath()
128
127
return config_path ('debugbar.php ' );
129
128
}
130
129
131
- /**
132
- * Publish the config file
133
- *
134
- * @param string $configPath
135
- */
136
- protected function publishConfig ($ configPath )
137
- {
138
- $ this ->publishes ([$ configPath => config_path ('debugbar.php ' )], 'config ' );
139
- }
140
-
141
130
/**
142
131
* Register the Debugbar Middleware
143
132
*
@@ -148,32 +137,4 @@ protected function registerMiddleware($middleware)
148
137
$ kernel = $ this ->app [Kernel::class];
149
138
$ kernel ->pushMiddleware ($ middleware );
150
139
}
151
-
152
- /**
153
- * Register the Response Listener
154
- *
155
- * @param string $middleware
156
- */
157
- protected function registerResponseListener ()
158
- {
159
- if (!isset ($ this ->app ['events ' ]) || !class_exists (ResponsePrepared::class)) {
160
- return ;
161
- }
162
-
163
- /**
164
- * For redirects, prepare the response early to store in the session.
165
- * For regular requests, get the stacked data early
166
- */
167
- $ this ->app ['events ' ]->listen (ResponsePrepared::class, function (ResponsePrepared $ event ) {
168
- /** @var LaravelDebugbar $debugbar */
169
- $ debugbar = $ this ->app ->make (LaravelDebugbar::class);
170
- if ($ debugbar ->isEnabled ()) {
171
- if ($ event ->response ->isRedirection ()) {
172
- $ debugbar ->modifyResponse ($ event ->request , $ event ->response );
173
- } else {
174
- $ debugbar ->getStackedData ();
175
- }
176
- }
177
- });
178
- }
179
140
}
0 commit comments