public function pluck($key, $unique = false)
    {
        $results = [];
        foreach ($this as $item) {
            $value = is_object($item) ? $item->$key : $item[$key];
            if ($unique) {
                $results[$value] = $value;
            } else {
                $results[] = $value;
            }
        }
        $collection = new static($results);
        return $collection->resetKeys();
    }
public function pluck($key, $unique = false)
    {
        $results = [];
        foreach ($this as $item) {
            $value = is_object($item) ? $item->$key : $item[$key];
            if ($unique) {
                $results[$value] = $value;
            } else {
                $results[] = $value;
            }
        }
        $collection = new static($results);
        return $collection->resetKeys();
    }
public function pluck ( $ key , $ unique = false ) { $ results = [ ] ; foreach ( $ this as $ item ) { $ value = is_object ( $ item ) ? $ item -> $ key : $ item [ $ key ] ; if ( $ unique ) { $ results [ $ value ] = $ value ; } else { $ results [ ] = $ value ; } } $ collection = new static ( $ results ) ; return $ collection -> resetKeys ( ) ; }
get a collection of values from property
@param  string $property
@return Object
get a collection of values from property