laravel/framework — pull request #2451 by hariharasudhankm (2013-10-09 19:50:59+00:00)
Title: collect funtion to return nested element as an array

Collect function like rails.
Will be useful in cases where you just want to get a particular field from all the records and use them in a whereIn query. Right now we have to iterate over each record even if just want to get a single field and then call a whereIn query to some other model.