src/Controller/HomeController.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. use Doctrine\DBAL\Connection;
  7. use App\Model\Home;
  8. class HomeController extends AbstractController
  9. {
  10.     /**
  11.      * @Route("/", name="home")
  12.      */
  13.     public function index(Home $home,Connection $conn): Response
  14.     {
  15.         
  16.         
  17.         return $this->render('home/index.html.twig', [
  18.             'title' => 'HlavnĂ­ strana',
  19.             'nextEvents' => $home->nextEvents($conn),
  20.             'lastResults' => $home->lastResults($conn)
  21.         ]);
  22.     }
  23. }