public function addRoute(
        string $name,
        array $methods,
        string $pattern,
        array $middlewares,
        array $handler,
        string $group = null
    ) {
        $this->routes[$name] = [
            'methods' => $methods,
            'pattern' => $pattern,
            'middlewares' => $middlewares,
            'handler' => $handler,
            'group' => $group
        ];
    }