public function mergeWithKey($items, $key, $default = null)
    {
        $key = $this->getKey($key);

        if ( ! $this->has($key)) throw new InvalidArgumentException('Key: '.$key.' not exists');

        $get = $this->get($key, $default);

        $value = array_merge($get, $this->retrieveValue($items));

        return $this->copy()->set($key, $value);
    }
public function mergeWithKey($items, $key, $default = null)
    {
        $key = $this->getKey($key);

        if ( ! $this->has($key)) throw new InvalidArgumentException('Key: '.$key.' not exists');

        $get = $this->get($key, $default);

        $value = array_merge($get, $this->retrieveValue($items));

        return $this->copy()->set($key, $value);
    }
public function mergeWithKey ( $ items , $ key , $ default = null ) { $ key = $ this -> getKey ( $ key ) ; if ( ! $ this -> has ( $ key ) ) throw new InvalidArgumentException ( 'Key: ' . $ key . ' not exists' ) ; $ get = $ this -> get ( $ key , $ default ) ; $ value = array_merge ( $ get , $ this -> retrieveValue ( $ items ) ) ; return $ this -> copy ( ) -> set ( $ key , $ value ) ; }
Merge Arrayable with specified key in Container.

@param mixed $items
@param mixed $key
@param null $default
@return $this
@throws InvalidArgumentException
Merge Arrayable with specified key in Container .