Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function output(Collection $detectedQueries, Response $response) |
||
14 | { |
||
15 | $collector = new MessagesCollector('N+1 Queries'); |
||
16 | |||
17 | foreach ($detectedQueries as $detectedQuery) { |
||
18 | $collector->addMessage(sprintf('Model: %s => Relation: %s - You should add with(%s) to eager-load this relation.', |
||
19 | $detectedQuery['model'], |
||
20 | $detectedQuery['relation'], |
||
21 | $detectedQuery['relation'] |
||
22 | )); |
||
23 | } |
||
24 | |||
25 | LaravelDebugbar::addCollector($collector); |
||
26 | } |
||
27 | } |
||
28 |