laravel/framework — pull request #2295 by JosephSilber (2013-09-15 19:00:26+00:00)
Title: Add key => value support to array_pluck, and use that in Collection::lists()

Adds support for `key => value` extraction to `array_pluck`:

$array = [
['framework' => 'Laravel', 'creator' => 'Taylor Otwell'],
['framework' => 'Codeigniter', 'creator' => 'Rick Ellis']
];

$data = array_pluck($array, 'creator', 'framework');

The above would return:

['Laravel' => 'Taylor Otwell', 'Codeigniter' => 'Rick Ellis']

---

In PHP 5.5, there's a similar function called [`array_column`](http://php.net/manual/en/function.array-column.php). The key difference is that `array_column` only supports array items, while `array_pluck` also supports object items.

The [`Collection::lists()`](https://github.com/laravel/framework/blob/master/src/Illuminate/Support/Collection.php#L367) method had a very similar implementation, so it now just calls `array_pluck` directly.