2023-10-06 21:11:28 +00:00
|
|
|
<?php
|
|
|
|
namespace Seria;
|
|
|
|
|
2024-03-30 00:38:44 +00:00
|
|
|
use Index\Http\Routing\{HttpGet,RouteHandler};
|
2023-10-06 21:11:28 +00:00
|
|
|
use Sasae\SasaeEnvironment;
|
|
|
|
|
|
|
|
class HomeRoutes extends RouteHandler {
|
|
|
|
public function __construct(
|
|
|
|
private ?SasaeEnvironment $templating
|
|
|
|
) {}
|
|
|
|
|
2024-03-30 00:38:44 +00:00
|
|
|
#[HttpGet('/')]
|
2023-10-06 21:11:28 +00:00
|
|
|
public function getIndex() {
|
|
|
|
return $this->templating->render('index');
|
|
|
|
}
|
|
|
|
|
2024-03-30 00:38:44 +00:00
|
|
|
#[HttpGet('/index.php')]
|
2023-10-06 21:11:28 +00:00
|
|
|
public function getIndexPHP($response): void {
|
|
|
|
$response->redirect('/', true);
|
|
|
|
}
|
|
|
|
}
|