private static function callController($route, $properties = [])
    {
        $props = $route['props'];
        $uses = $props['uses'];

        // Check if any middleware has been set.
        if (! empty($props['middleware'])) {
            if (! ctype_upper(substr($props['middleware'], 0, 1))) {
                $middleware = substr_replace($props['middleware'], strtoupper(substr($props['middleware'], 0, 1)), 0);
                $middleware .= substr($props['middleware'], 1, strlen($props['middleware']));
            } else {
                $middleware = $props['middleware'];
            }

            if (! file_exists(PATH . '/app/Middleware/' . $middleware . '.php')) {
                throw new MiddlewareNotFoundException($middleware);
            }
            $class = self::$middlewareNamespace . $middleware;
            $allowal = $class::allow($route, $properties);

            if ($allowal !== true) {
                return $allowal;
            }
        }

        $controller = explode('@', $uses)[0];
        $method = explode('@', $uses)[1];

        if (file_exists(PATH . '/app/Controllers/' . $controller . '.php')) {

            // Calling controller method.
            $controller = self::$namespace . $controller;
            $cont = new $controller;

            return $cont->$method($properties);
        }
        throw new ControllerNotFoundException($controller);
    }