diff --git a/src/Outputs/Alert.php b/src/Outputs/Alert.php index e951d74..4171a33 100644 --- a/src/Outputs/Alert.php +++ b/src/Outputs/Alert.php @@ -37,7 +37,7 @@ protected function getOutputContent(Collection $detectedQueries) $output .= "alert('Found the following N+1 queries in this request:\\n\\n"; foreach ($detectedQueries as $detectedQuery) { $output .= "Model: ".addslashes($detectedQuery['model']). " => Relation: ".addslashes($detectedQuery['relation']); - $output .= " - You should add \"with(\'".$detectedQuery['relation']."\')\" to eager-load this relation."; + $output .= " - You should add \"with(\'".addslashes($detectedQuery['relation'])."\')\" to eager-load this relation."; $output .= "\\n"; } $output .= "')"; @@ -45,4 +45,4 @@ protected function getOutputContent(Collection $detectedQueries) return $output; } -} \ No newline at end of file +}