Skip to content

Commit aff3235

Browse files
authored
Update Debugbar to include autoshow setting (#1393)
I think that's a valid point to include, due to the fact that in a lot of software with the autoshow set to true it's impossible to use the debugbar. I'm in Laravel Nova right now, every time a notification ajax gets sent, the request I'm debugging gets removed by that setting. I've tried to add a middleware to enable that setting, but it breaks other things in beetween. Right now this it's the most polished solution. Let me know if it's ok! Thanks!
1 parent 8548ee3 commit aff3235

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/LaravelDebugbar.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,9 +897,12 @@ function (&$item) {
897897
*/
898898
public function injectDebugbar(Response $response)
899899
{
900+
$config = $this->app['config'];
900901
$content = $response->getContent();
901902

902903
$renderer = $this->getJavascriptRenderer();
904+
$autoShow = $config->get('debugbar.ajax_handler_auto_show', true);
905+
$renderer->setAjaxHandlerAutoShow($autoShow);
903906
if ($this->getStorage()) {
904907
$openHandlerUrl = route('debugbar.openhandler');
905908
$renderer->setOpenHandlerUrl($openHandlerUrl);

0 commit comments

Comments
 (0)