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)
4141 $ output = '<script type="text/javascript"> ' ;
4242 $ output .= "alert('Found the following N+1 queries in this request: \\n \\n " ;
4343 foreach ($ detectedQueries as $ detectedQuery ) {
44- $ output .= "Model: " .addslashes ($ detectedQuery ['model ' ]). " => Relation: " .addslashes ($ detectedQuery ['relation ' ]);
44+ $ output .= "Model: " .addslashes ($ detectedQuery ['model ' ])." => Relation: " .addslashes ($ detectedQuery ['relation ' ]);
4545 $ output .= " - You should add \"with(\' " .addslashes ($ detectedQuery ['relation ' ])."\') \" to eager-load this relation. " ;
4646 $ output .= "\\n " ;
4747 }
Original file line number Diff line number Diff line change @@ -41,9 +41,18 @@ protected function getOutputContent(Collection $detectedQueries)
4141 $ output = '<script type="text/javascript"> ' ;
4242 $ output .= "console.warn('Found the following N+1 queries in this request: \\n \\n " ;
4343 foreach ($ detectedQueries as $ detectedQuery ) {
44- $ output .= "Model: " .addslashes ($ detectedQuery ['model ' ]). " => Relation: " .addslashes ($ detectedQuery ['relation ' ]);
44+ $ output .= "Model: " .addslashes ($ detectedQuery ['model ' ])." => Relation: " .addslashes ($ detectedQuery ['relation ' ]);
4545 $ 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 " ;
4650 $ output .= "\\n " ;
51+ $ output .= 'Call-Stack: \\n ' ;
52+
53+ foreach ($ detectedQuery ['sources ' ] as $ source ) {
54+ $ output .= "# $ source ->index $ source ->name : $ source ->line \\n " ;
55+ }
4756 }
4857 $ output .= "') " ;
4958 $ output .= '</script> ' ;
You can’t perform that action at this time.
0 commit comments