src/Controller/HomeController.php line 12
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class HomeController extends AbstractController
{
#[Route('/', name: 'app_home')]
public function index(): Response
{
return $this->render('home/index.html.twig', [
'controller_name' => 'HomeController',
]);
}
}
//Comienza filtro por parametro para evitar acceso durante pruebas
// namespace App\Controller;
// use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
// use Symfony\Component\HttpFoundation\RedirectResponse;
// use Symfony\Component\HttpFoundation\Request;
// use Symfony\Component\HttpFoundation\Response;
// use Symfony\Component\Routing\Annotation\Route;
// class HomeController extends AbstractController
// {
// #[Route('/', name: 'app_home')]
// public function index(Request $request): Response
// {
// $testFirmaVila = $request->query->get('testFirmaVila');
// // https://firma.vilaviniteca.es?testFirmaVila
// if ($testFirmaVila === null) {
// return new RedirectResponse('https://www.vilaviniteca.es/');
// }
// return $this->render('home/index.html.twig', [
// 'controller_name' => 'HomeController',
// ]);
// }
// }