Commit f6ef233d authored by Taylor Otwell's avatar Taylor Otwell

alias aggregate column in query grammar.

parent 5919b039
......@@ -93,7 +93,7 @@ class Grammar extends \Laravel\Database\Grammar {
if ($query->distinct and $column !== '*') $column = 'DISTINCT '.$column;
return 'SELECT '.$query->aggregate['aggregator'].'('.$column.')';
return 'SELECT '.$query->aggregate['aggregator'].'('.$column.') AS '.$this->wrap('aggregate');
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment