src/Controller/HomeController.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Component\Routing\Annotation\Route;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Twig\Environment;
  7. class HomeController extends AbstractController
  8. {
  9.     #[Route('/'name:'home_page'methods:['GET'])]
  10.     /**
  11.      * this function shows home page
  12.      *
  13.      * @return void
  14.      * 
  15.     */
  16.     
  17.     public function home(Environment $twig null):Response
  18.     {
  19.         // throw new NotFoundHttpException('The required page does not exist');    
  20.         return $this->render('pages/home.html.twig');
  21.     }
  22. }