File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,18 @@ protected function getOutputContent(Collection $detectedQueries)
27
27
$ output = '<script type="text/javascript"> ' ;
28
28
$ output .= "console.warn('Found the following N+1 queries in this request: \\n \\n " ;
29
29
foreach ($ detectedQueries as $ detectedQuery ) {
30
- $ output .= "Model: " .addslashes ($ detectedQuery ['model ' ]). " => Relation: " .addslashes ($ detectedQuery ['relation ' ]);
31
- $ output .= " - You should add \"with(\' " .$ detectedQuery ['relation ' ]."\') \" to eager-load this relation. " ;
30
+ $ output .= "Model: " . addslashes ($ detectedQuery ['model ' ]) . " => Relation: " . addslashes ($ detectedQuery ['relation ' ]);
31
+ $ output .= " - You should add \"with(\' " . $ detectedQuery ['relation ' ] . "\') \" to eager-load this relation. " ;
32
+ $ output .= "\\n \\n " ;
33
+ $ output .= "Model: " . addslashes ($ detectedQuery ['model ' ]) . "\\n " ;
34
+ $ output .= "Relation: " . $ detectedQuery ['relation ' ] . "\\n " ;
35
+ $ output .= "Num-Called: " . $ detectedQuery ['count ' ] . "\\n " ;
32
36
$ output .= "\\n " ;
37
+ $ output .= 'Call-Stack: \\n ' ;
38
+
39
+ foreach ($ detectedQuery ['sources ' ] as $ source ) {
40
+ $ output .= "# $ source ->index $ source ->name : $ source ->line \\n " ;
41
+ }
33
42
}
34
43
$ output .= "') " ;
35
44
$ output .= '</script> ' ;
You can’t perform that action at this time.
0 commit comments