laravel/framework — pull request #1434 by sduran (2013-05-28 14:34:30+00:00)
Title: Get the collection of items in a key=>value array

I posted an issue about this in the laravel/laravel github repository, it got "resolved" extending the Collection class, and creating a Model class implementing the newCollection method.

While it works, I think this belongs in the core Collection class.

I pushed a simple implementation, but it would work better with a KeyValueIterator I wrote (too bad generators will only be available in php5.5)

This function would not break anything and goes great with laravel's philosofy of making repetitive tasks easier for the developer, as this need is quite common.