Skip to content

Commit

Permalink
fix bug query builder / eloquent builder grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
railken committed Apr 4, 2024
1 parent cb0d5a9 commit e409289
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Query/Visitors/BaseOperatorVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public function parseNode($query, $node)

$childs = $childs->map(function ($v) use ($query) {
if ($v instanceof \Illuminate\Database\Query\Expression) {
return $v->getValue($query->grammar);
$qb = $query instanceof \Illuminate\Database\Query\Builder ? $query : $query->getQuery();
return $v->getValue($qb->grammar);
}

$query->addBinding($v, 'where');
Expand Down

0 comments on commit e409289

Please sign in to comment.