src/Valkyrja/Http/NativeResponseBuilder.php
public function view(
        string $template,
        array $data = [],
        int $statusCode = StatusCode::OK,
        array $headers = []
    ): Response {
        $content = $this->app->view()->make($template, $data)->render();

        return $this->make($content, $statusCode, $headers);
    }
public function view(
        string $template,
        array $data = [],
        int $statusCode = StatusCode::OK,
        array $headers = []
    ): Response {
        $content = $this->app->view()->make($template, $data)->render();

        return $this->make($content, $statusCode, $headers);
    }
View response builder.

@param string $template   The view template to use
@param array  $data       [optional] The view data
@param int    $statusCode [optional] The response status code
@param array  $headers    [optional] An array of response headers

@return \Valkyrja\Http\Response