laravel/framework — pull request #6803 by JosephSilber (2014-12-26 17:18:08+00:00)
Title: Return collection from query builder

Eloquent's query builder already returns an Eloquent collection.

This change has the query builder itself return an instance of `Illuminate\Support\Collection`, so that you can get all of the collection's goodness when doing simple DB queries. Example:

```php
DB::table('user')->all()->groupBy('age');
```

The next step would be to pass around the collection in eloquent's eager loading and relation matching. Right now a simple array is being passed around all over the place, which is extremely inefficient (since arrays are passed by value).

I didn't want this to be one humongous change, so I've left that for a subsequent PR. I'm really looking forward to that though.