src/HandlerList.php
public function remove($nameOrInstance)
    {
        if (is_callable($nameOrInstance)) {
            $this->removeByInstance($nameOrInstance);
        } elseif (is_string($nameOrInstance)) {
            $this->removeByName($nameOrInstance);
        }
    }
public function remove($nameOrInstance)
    {
        if (is_callable($nameOrInstance)) {
            $this->removeByInstance($nameOrInstance);
        } elseif (is_string($nameOrInstance)) {
            $this->removeByName($nameOrInstance);
        }
    }
public function remove ( $ nameOrInstance ) { if ( is_callable ( $ nameOrInstance ) ) { $ this -> removeByInstance ( $ nameOrInstance ) ; } elseif ( is_string ( $ nameOrInstance ) ) { $ this -> removeByName ( $ nameOrInstance ) ; } }
Remove a middleware by name or by instance from the list.

@param string|callable $nameOrInstance Middleware to remove.
Remove a middleware by name or by instance from the list .