This commit is contained in:
thibaud-leclere
2026-01-13 13:58:53 +01:00
commit d4a3d32e0a
70 changed files with 19078 additions and 0 deletions

0
src/Controller/.gitignore vendored Normal file
View File

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace App\Controller;
use App\Gateway\TMDBGateway;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpClient\Exception\ClientException;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class HomepageController extends AbstractController
{
public function __construct(
private readonly TMDBGateway $TMDBGateway,
) {
}
#[Route('/')]
public function index(): Response
{
try {
dd($this->TMDBGateway->searchMovie('The Batman'));
} catch (ClientException $e) {
dd($e->getResponse()->getInfo());
}
return $this->render('homepage/index.html.twig');
}
}