Skip to content

Commit

Permalink
Change join to left join
Browse files Browse the repository at this point in the history
Left join it’s necessary to keep in the results the rows that don’t
have relations
  • Loading branch information
nicolaslopezj committed Oct 10, 2014
1 parent ba00f24 commit d4b3f02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Nicolaslopezj/Searchable/SearchableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function getJoins() {
*/
protected function makeJoins(&$query) {
foreach ($this->getJoins() as $table => $keys) {
$query->join($table, $keys[0], '=', $keys[1]);
$query->leftJoin($table, $keys[0], '=', $keys[1]);
}
}

Expand Down

0 comments on commit d4b3f02

Please sign in to comment.