function only(array $keys) {
        $new = array();
        foreach($this->data as $key => $val) {
            if(\in_array($key, $keys, true)) {
                $new[$key] = $val;
            }
        }
        
        return (new self($new));
    }
function only(array $keys) {
        $new = array();
        foreach($this->data as $key => $val) {
            if(\in_array($key, $keys, true)) {
                $new[$key] = $val;
            }
        }
        
        return (new self($new));
    }
function only ( array $ keys ) { $ new = array ( ) ; foreach ( $ this -> data as $ key => $ val ) { if ( \ in_array ( $ key , $ keys , true ) ) { $ new [ $ key ] = $ val ; } } return ( new self ( $ new ) ) ; }
Returns the items in the collection with the specified keys. Returns a new Collection.
@param mixed[]  $keys
@return \CharlotteDunois\Collect\Collection
Returns the items in the collection with the specified keys . Returns a new Collection .