public function view(string $template = '', array $variables = []): View
    {
        /** @var \Valkyrja\View\View $view */
        $view = $this->container()->getSingleton(View::class);

        if (\func_num_args() === 0) {
            return $view;
        }

        return $view->make($template, $variables);
    }