colossus/src/Controllers/ReportController.php

23 lines
568 B
PHP
Raw Normal View History

2024-06-03 12:25:29 -04:00
<?php
namespace BitGoblin\Colossus\Controllers;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Routing\RouteContext;
use Slim\Views\Twig;
use BitGoblin\Colossus\Models\Benchmark;
class ResultController extends Controller {
public function getGenerate(Request $request, Response $response): Response {
$benchmarks = Benchmark::get();
$view = Twig::fromRequest($request);
return $view->render($response, 'reports/generate.twig', [
'benchmarks' => $benchmarks,
]);
}
}