src/Controller/HomeController.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\Routing\Annotation\Route;
  5. class HomeController extends AbstractController
  6. {
  7.     /**
  8.      * @Route("/", name="home")
  9.      */
  10.     public function index()
  11.     {
  12.         try {
  13.             return $this->render('home/index.html.twig', [
  14.                 'controller_name' => 'HomeController',
  15.             ]);
  16.         } catch (\Symfony\Component\Routing\Exception\ResourceNotFoundException $e) {
  17.             return $this->render('error/index.html.twig', [
  18.                 'message' => 'Enlace no encontrado'
  19.             ]);
  20.         }
  21.     }
  22. }