src/Valkyrja/Http/NativeKernel.php
public function terminate(Request $request, Response $response): void
    {
        // Dispatch the terminable middleware
        $this->terminableMiddleware($request, $response);

        // Terminate route middleware
        $this->terminateRouteMiddleware($request, $response);

        // Trigger an event for kernel terminate
        $this->app->events()->trigger(
            HttpKernelTerminate::class,
            [
                new HttpKernelTerminate($request, $response),
            ]
        );
    }
public function terminate(Request $request, Response $response): void
    {
        // Dispatch the terminable middleware
        $this->terminableMiddleware($request, $response);

        // Terminate route middleware
        $this->terminateRouteMiddleware($request, $response);

        // Trigger an event for kernel terminate
        $this->app->events()->trigger(
            HttpKernelTerminate::class,
            [
                new HttpKernelTerminate($request, $response),
            ]
        );
    }
Terminate the request.

@param Request  $request  The request
@param Response $response The response

@return void