public static function redirect($route, $to, $name = null, $middleware = null)
    {
        $target = function () use ($to) {
            if (!filter_var($to, FILTER_VALIDATE_URL)) {
                $to = static::getInstance()->route($to);
            }

            return redirect($to, 301);
        };

        return static::all($route, $target, $name, $middleware);
    }