laravel/laravel — pull request #1343 by kapv89 (2012-10-12 10:23:55+00:00)
Title: Allow aggregates to function alongside group_by

Modified the aggregate so that if the query has any groupings, the standard query would be made a sub query on which the aggregating function would be called