Skip to content

Commit

Permalink
wrap directly through query
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 29, 2020
1 parent aa81c2e commit 20b0c6e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public function withAggregate($relations, $column, $function = null)
$relation = $this->getRelationWithoutConstraints($name);

$expression = $function
? sprintf('%s(%s)', $function, $this->getGrammar()->wrap($column))
? sprintf('%s(%s)', $function, $this->getQuery()->getGrammar()->wrap($column))
: $column;

// Here, we will grab the relationship sub-query and prepare to add it to the main query
Expand Down

0 comments on commit 20b0c6e

Please sign in to comment.