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;
|
|
|
|
|
2024-06-03 12:26:18 -04:00
|
|
|
class ReportController extends Controller {
|
2024-06-03 12:25:29 -04:00
|
|
|
|
|
|
|
public function getGenerate(Request $request, Response $response): Response {
|
|
|
|
$benchmarks = Benchmark::get();
|
|
|
|
|
|
|
|
$view = Twig::fromRequest($request);
|
|
|
|
return $view->render($response, 'reports/generate.twig', [
|
|
|
|
'benchmarks' => $benchmarks,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|