diff --git a/src/Illuminate/Foundation/Exceptions/Renderer/Listener.php b/src/Illuminate/Foundation/Exceptions/Renderer/Listener.php index d8102106b1d2..325fad4c20ac 100644 --- a/src/Illuminate/Foundation/Exceptions/Renderer/Listener.php +++ b/src/Illuminate/Foundation/Exceptions/Renderer/Listener.php @@ -4,6 +4,8 @@ use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Database\Events\QueryExecuted; +use Illuminate\Queue\Events\JobProcessed; +use Illuminate\Queue\Events\JobProcessing; use Laravel\Octane\Events\RequestReceived; use Laravel\Octane\Events\RequestTerminated; use Laravel\Octane\Events\TaskReceived; @@ -28,6 +30,10 @@ public function registerListeners(Dispatcher $events) { $events->listen(QueryExecuted::class, [$this, 'onQueryExecuted']); + $events->listen([JobProcessing::class, JobProcessed::class], function () { + $this->queries = []; + }); + if (isset($_SERVER['LARAVEL_OCTANE'])) { $events->listen([RequestReceived::class, TaskReceived::class, TickReceived::class, RequestTerminated::class], function () { $this->queries = []; diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php index 2ef340ba0546..baa28929f580 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php @@ -38,6 +38,12 @@ hljs.initLineNumbersOnLoad() window.addEventListener('load', function() { + document.querySelectorAll('.renderer').forEach(function(element, index) { + if (index > 0) { + element.remove(); + } + }); + document.querySelector('.default-highlightable-code').style.display = 'block'; document.querySelectorAll('.highlightable-code').forEach(function(element) { diff --git a/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php b/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php index 387680179c78..110b7211204c 100644 --- a/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php +++ b/src/Illuminate/Foundation/resources/exceptions/renderer/components/theme-swicher.blade.php @@ -1,31 +1,34 @@