protected function pluckFromArrayColumn($queryResult, $column, $key)
    {
        $results = [];

        if (is_null($key)) {
            foreach ($queryResult as $row) {
                $results[] = $row[$column];
            }
        } else {
            foreach ($queryResult as $row) {
                $results[$row[$key]] = $row[$column];
            }
        }

        return collect($results);
    }
protected function pluckFromArrayColumn($queryResult, $column, $key)
    {
        $results = [];

        if (is_null($key)) {
            foreach ($queryResult as $row) {
                $results[] = $row[$column];
            }
        } else {
            foreach ($queryResult as $row) {
                $results[$row[$key]] = $row[$column];
            }
        }

        return collect($results);
    }
protected function pluckFromArrayColumn ( $ queryResult , $ column , $ key ) { $ results = [ ] ; if ( is_null ( $ key ) ) { foreach ( $ queryResult as $ row ) { $ results [ ] = $ row [ $ column ] ; } } else { foreach ( $ queryResult as $ row ) { $ results [ $ row [ $ key ] ] = $ row [ $ column ] ; } } return collect ( $ results ) ; }
Retrieve column values from rows represented as arrays.

@param  array  $queryResult
@param  string $column
@param  string $key
@return \Illuminate\Support\Collection
Retrieve column values from rows represented as arrays .