public function remove(string $middlewareClass): void
    {
        foreach( $this->middlewareStack as $i => $middleware ){
            if( $middleware instanceof $middlewareClass ){
                unset($this->middlewareStack[$i]);
            }
        }
    }
public function remove(string $middlewareClass): void
    {
        foreach( $this->middlewareStack as $i => $middleware ){
            if( $middleware instanceof $middlewareClass ){
                unset($this->middlewareStack[$i]);
            }
        }
    }
public function remove ( string $ middlewareClass ) : void { foreach ( $ this -> middlewareStack as $ i => $ middleware ) { if ( $ middleware instanceof $ middlewareClass ) { unset ( $ this -> middlewareStack [ $ i ] ) ; } } }
Remove a layer by its classname.

@param string $middlewareClass
Remove a layer by its classname .