Skip to content

Commit 7f85d1f

Browse files
authored
Merge pull request #19 from janpio/patch-1
Fix output of relationship name in advice part of alert
2 parents 0d92e1c + 335f7dd commit 7f85d1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Outputs/Alert.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ protected function getOutputContent(Collection $detectedQueries)
3737
$output .= "alert('Found the following N+1 queries in this request:\\n\\n";
3838
foreach ($detectedQueries as $detectedQuery) {
3939
$output .= "Model: ".addslashes($detectedQuery['model']). " => Relation: ".addslashes($detectedQuery['relation']);
40-
$output .= " - You should add \"with(\'".$detectedQuery['relation']."\')\" to eager-load this relation.";
40+
$output .= " - You should add \"with(\'".addslashes($detectedQuery['relation'])."\')\" to eager-load this relation.";
4141
$output .= "\\n";
4242
}
4343
$output .= "')";
4444
$output .= '</script>';
4545

4646
return $output;
4747
}
48-
}
48+
}

0 commit comments

Comments
 (0)