File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ protected function getOutputContent(Collection $detectedQueries)
41
41
$ output = '<script type="text/javascript"> ' ;
42
42
$ output .= "alert('Found the following N+1 queries in this request: \\n \\n " ;
43
43
foreach ($ detectedQueries as $ detectedQuery ) {
44
- $ output .= "Model: " .addslashes ($ detectedQuery ['model ' ]). " => Relation: " .addslashes ($ detectedQuery ['relation ' ]);
44
+ $ output .= "Model: " .addslashes ($ detectedQuery ['model ' ])." => Relation: " .addslashes ($ detectedQuery ['relation ' ]);
45
45
$ output .= " - You should add \"with(\' " .addslashes ($ detectedQuery ['relation ' ])."\') \" to eager-load this relation. " ;
46
46
$ output .= "\\n " ;
47
47
}
Original file line number Diff line number Diff line change @@ -41,9 +41,18 @@ protected function getOutputContent(Collection $detectedQueries)
41
41
$ output = '<script type="text/javascript"> ' ;
42
42
$ output .= "console.warn('Found the following N+1 queries in this request: \\n \\n " ;
43
43
foreach ($ detectedQueries as $ detectedQuery ) {
44
- $ output .= "Model: " .addslashes ($ detectedQuery ['model ' ]). " => Relation: " .addslashes ($ detectedQuery ['relation ' ]);
44
+ $ output .= "Model: " .addslashes ($ detectedQuery ['model ' ])." => Relation: " .addslashes ($ detectedQuery ['relation ' ]);
45
45
$ output .= " - You should add \"with(\' " .$ detectedQuery ['relation ' ]."\') \" to eager-load this relation. " ;
46
+ $ output .= "\\n \\n " ;
47
+ $ output .= "Model: " .addslashes ($ detectedQuery ['model ' ])."\\n " ;
48
+ $ output .= "Relation: " .$ detectedQuery ['relation ' ]."\\n " ;
49
+ $ output .= "Num-Called: " .$ detectedQuery ['count ' ]."\\n " ;
46
50
$ output .= "\\n " ;
51
+ $ output .= 'Call-Stack: \\n ' ;
52
+
53
+ foreach ($ detectedQuery ['sources ' ] as $ source ) {
54
+ $ output .= "# $ source ->index $ source ->name : $ source ->line \\n " ;
55
+ }
47
56
}
48
57
$ output .= "') " ;
49
58
$ output .= '</script> ' ;
You can’t perform that action at this time.
0 commit comments