Skip to content

Commit

Permalink
Merge pull request #160 from spunkylm/master
Browse files Browse the repository at this point in the history
Fix bindings on a polymorphic join
  • Loading branch information
nicolaslopezj authored Jun 21, 2018
2 parents c067f11 + 63f86ca commit 3598af7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SearchableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected function makeJoins(Builder $query)
$query->leftJoin($table, function ($join) use ($keys) {
$join->on($keys[0], '=', $keys[1]);
if (array_key_exists(2, $keys) && array_key_exists(3, $keys)) {
$join->where($keys[2], '=', $keys[3]);
$join->whereRaw($keys[2] . ' = "' . $keys[3] . '"');
}
});
}
Expand Down

0 comments on commit 3598af7

Please sign in to comment.