Skip to content

Commit 59c89a6

Browse files
committed
Fix aggregate column escaping (#16815)
1 parent ecaaf80 commit 59c89a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/Eloquent/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ public function withSum($relation, $column)
11401140
*/
11411141
protected function withAggregate($aggregate, $relation, $column)
11421142
{
1143-
return $this->withRaw($relation, new Expression($aggregate.'('.$column.')'), $aggregate);
1143+
return $this->withRaw($relation, new Expression($aggregate.'("'.$column.'")'), $aggregate);
11441144
}
11451145

11461146
/**

0 commit comments

Comments
 (0)