src/Collection.php
public function delete($key)
    {
        if (! $this->has($key)) return null;

        $value = $this->items[$key];

        unset($this->items[$key]);

        return $value;
    }
public function delete($key)
    {
        if (! $this->has($key)) return null;

        $value = $this->items[$key];

        unset($this->items[$key]);

        return $value;
    }
public function delete ( $ key ) { if ( ! $ this -> has ( $ key ) ) return null ; $ value = $ this -> items [ $ key ] ; unset ( $ this -> items [ $ key ] ) ; return $ value ; }
Unset item from collection via index and return value

@param int|string $key
@return mixed
Unset item from collection via index and return value