src/MultilevelCollection.php
public function unset(string $key): void
    {
        $slug = $this->splitKey($key);

        if (is_string($slug)) {
            if (isset($this[$slug])) {
                unset($this[$slug]);
            }
        } else {
            if ($this->has($key)) {
                $this->set($key, null);
            }
        }
    }
public function unset(string $key): void
    {
        $slug = $this->splitKey($key);

        if (is_string($slug)) {
            if (isset($this[$slug])) {
                unset($this[$slug]);
            }
        } else {
            if ($this->has($key)) {
                $this->set($key, null);
            }
        }
    }
public function unset ( string $ key ) : void { $ slug = $ this -> splitKey ( $ key ) ; if ( is_string ( $ slug ) ) { if ( isset ( $ this [ $ slug ] ) ) { unset ( $ this [ $ slug ] ) ; } } else { if ( $ this -> has ( $ key ) ) { $ this -> set ( $ key , null ) ; } } }
Unsets an item from collection.

@param string $key The item's key

@return void
Unsets an item from collection .