src/ArrayObject.php
public function pluckArray($key): array
    {
        if ($this->isCollection()) {
            return array_map(function ($val) {
                return $this->box($val);
            }, CollectionUtility::pluck($this->data, $key));
        }

        // Non-collection
        return CollectionUtility::pluck([$this->data], $key);
    }
public function pluckArray($key): array
    {
        if ($this->isCollection()) {
            return array_map(function ($val) {
                return $this->box($val);
            }, CollectionUtility::pluck($this->data, $key));
        }

        // Non-collection
        return CollectionUtility::pluck([$this->data], $key);
    }
public function pluckArray ( $ key ) : array { if ( $ this -> isCollection ( ) ) { return array_map ( function ( $ val ) { return $ this -> box ( $ val ) ; } , CollectionUtility :: pluck ( $ this -> data , $ key ) ) ; } // Non-collection return CollectionUtility :: pluck ( [ $ this -> data ] , $ key ) ; }
Pluck a value by key from each result and return an array.

@param $key

@return array
Pluck a value by key from each result and return an array .