Skip to content

Commit

Permalink
Merge pull request beyondcode#19 from janpio/patch-1
Browse files Browse the repository at this point in the history
Fix output of relationship name in advice part of alert
  • Loading branch information
mpociot authored Jul 19, 2018
2 parents 0d92e1c + 335f7dd commit 7f85d1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Outputs/Alert.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ 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 .= "')";
$output .= '</script>';

return $output;
}
}
}

0 comments on commit 7f85d1f

Please sign in to comment.