laravel/laravel — pull request #1359 by kapv89 (2012-10-17 05:59:42+00:00)
Title: Allow aggregates to work on queries using 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