public function middleware($name)
    {
        if (is_string($name)) {
            app()->addRouteMiddleware($name);
        } else if (is_array($name)) {
            foreach ($name as $middlewareName) {
                app()->addRouteMiddleware($middlewareName);
            }
        }
    }