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