23 lines
488 B
PHP
23 lines
488 B
PHP
<?php
|
|
namespace Seria;
|
|
|
|
use Index\Routing\Route;
|
|
use Index\Routing\RouteHandler;
|
|
use Sasae\SasaeEnvironment;
|
|
|
|
class HomeRoutes extends RouteHandler {
|
|
public function __construct(
|
|
private ?SasaeEnvironment $templating
|
|
) {}
|
|
|
|
#[Route('GET', '/')]
|
|
public function getIndex() {
|
|
return $this->templating->render('index');
|
|
}
|
|
|
|
#[Route('GET', '/index.php')]
|
|
public function getIndexPHP($response): void {
|
|
$response->redirect('/', true);
|
|
}
|
|
}
|