src/Mutator.php
protected function copyCollectionWith(Collection $collection, array $values)
    {
        $collection = clone $collection;

        $collection->exchangeArray($values);

        return $collection;
    }
protected function copyCollectionWith(Collection $collection, array $values)
    {
        $collection = clone $collection;

        $collection->exchangeArray($values);

        return $collection;
    }
protected function copyCollectionWith ( Collection $ collection , array $ values ) { $ collection = clone $ collection ; $ collection -> exchangeArray ( $ values ) ; return $ collection ; }
Get a copy of a collection with new values.

@param Collection $collection
@param array $values
@return Collection
Get a copy of a collection with new values .