public function setMiddleware($middleware): Route
    {
        if( !is_array($middleware) ){
            $middleware = [$middleware];
        }

        $this->middleware = array_merge($this->middleware, $middleware);

        return $this;
    }
public function setMiddleware($middleware): Route
    {
        if( !is_array($middleware) ){
            $middleware = [$middleware];
        }

        $this->middleware = array_merge($this->middleware, $middleware);

        return $this;
    }
public function setMiddleware ( $ middleware ) : Route { if ( ! is_array ( $ middleware ) ) { $ middleware = [ $ middleware ] ; } $ this -> middleware = array_merge ( $ this -> middleware , $ middleware ) ; return $ this ; }
Apply middleware to this route

@param string|array $middleware
@return Route
Apply middleware to this route