-
-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathHomeController.php
More file actions
32 lines (26 loc) · 835 Bytes
/
HomeController.php
File metadata and controls
32 lines (26 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
declare(strict_types=1);
namespace Flow\Website\Controller;
use Flow\Website\Service\{Examples};
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
final class HomeController extends AbstractController
{
public function __construct(
private readonly Examples $examples,
) {
}
#[Route('/', name: 'home', options: ['sitemap' => true])]
public function home() : Response
{
return $this->render('main/index.html.twig', [
'topics' => $this->examples->topics(),
]);
}
#[Route('/sponsor', name: 'sponsor', options: ['sitemap' => false])]
public function sponsor() : Response
{
return $this->render('main/sponsor.html.twig', []);
}
}