Skip to content

Commit d46af6b

Browse files
authored
Merge pull request #47 from mr-feek/patch-2
fix: dont add the collector to debugbar twice
2 parents 3f29d3e + 63dd0a6 commit d46af6b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Outputs/Debugbar.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ class Debugbar implements Output
1515
public function boot()
1616
{
1717
$this->collector = new MessagesCollector('N+1 Queries');
18-
19-
LaravelDebugbar::addCollector($this->collector);
18+
19+
if (!LaravelDebugbar::hasCollector($this->collector->getName())) {
20+
LaravelDebugbar::addCollector($this->collector);
21+
}
2022
}
2123

2224
public function output(Collection $detectedQueries, Response $response)

0 commit comments

Comments
 (0)