src/Collection/ArrayCollection.php
public function pluck(string $key): ArrayCollection
    {
        return $this->map(function ($value) use ($key) {
            return $value[$key] ?? null;
        });
    }
public function pluck(string $key): ArrayCollection
    {
        return $this->map(function ($value) use ($key) {
            return $value[$key] ?? null;
        });
    }
public function pluck ( string $ key ) : ArrayCollection { return $ this -> map ( function ( $ value ) use ( $ key ) { return $ value [ $ key ] ?? null ; } ) ; }
Creates a collection of values with a given key

@param string $key The key

@return ArrayCollection
Creates a collection of values with a given key