Skip to content

Commit 58eaa5d

Browse files
authored
Always render widget in footer (#1834)
1 parent 3ed7638 commit 58eaa5d

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/LaravelDebugbar.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -993,17 +993,7 @@ public function injectDebugbar(Response $response): void
993993
$renderer->setOpenHandlerUrl($openHandlerUrl);
994994
}
995995

996-
$head = $renderer->renderHead();
997-
$widget = $renderer->render();
998-
999-
// Try to put the js/css directly before the </head>
1000-
$pos = stripos($content, '</head>');
1001-
if (false !== $pos) {
1002-
$content = substr($content, 0, $pos) . $head . substr($content, $pos);
1003-
} else {
1004-
// Append the head before the widget
1005-
$widget = $head . $widget;
1006-
}
996+
$widget = "<!-- Laravel Debugbar Widget -->\n" . $renderer->renderHead() . $renderer->render();
1007997

1008998
// Try to put the widget at the end, directly before the </body>
1009999
$pos = strripos($content, '</body>');

0 commit comments

Comments
 (0)