@@ -102,7 +102,6 @@ public function boot()
102102
103103 $ this ->loadRoutesFrom (__DIR__ . '/debugbar-routes.php ' );
104104
105- $ this ->registerResponseListener ();
106105 $ this ->registerMiddleware (InjectDebugbar::class);
107106
108107 $ this ->commands (['command.debugbar.clear ' ]);
@@ -128,16 +127,6 @@ protected function getConfigPath()
128127 return config_path ('debugbar.php ' );
129128 }
130129
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-
141130 /**
142131 * Register the Debugbar Middleware
143132 *
@@ -148,32 +137,4 @@ protected function registerMiddleware($middleware)
148137 $ kernel = $ this ->app [Kernel::class];
149138 $ kernel ->pushMiddleware ($ middleware );
150139 }
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- }
179140}
0 commit comments