diff --git a/config/debugbar.php b/config/debugbar.php index fe3b192d7..9597b0204 100644 --- a/config/debugbar.php +++ b/config/debugbar.php @@ -199,6 +199,7 @@ ], 'hints' => false, // Show hints for common mistakes 'show_copy' => false, // Show copy button next to the query + 'traces_count' => 5, // How many relevant traces to load ], 'mail' => [ 'full_log' => false, diff --git a/src/DataCollector/QueryCollector.php b/src/DataCollector/QueryCollector.php index 17c3f69eb..6f900f422 100644 --- a/src/DataCollector/QueryCollector.php +++ b/src/DataCollector/QueryCollector.php @@ -177,7 +177,7 @@ public function addQuery($query, $bindings, $time, $connection) if ($this->findSource) { try { - $source = array_slice($this->findSource(), 0, 5); + $source = array_slice($this->findSource(), 0, config('debugbar.options.db.traces_count')); } catch (\Exception $e) { } }