date-poll-api/src/Controller/DefaultController.php

30 lines
592 B
PHP
Raw Normal View History

<?php
2020-01-30 11:28:24 +01:00
namespace App\Controller;
2020-10-26 11:39:04 +01:00
use App\Entity\Poll;
2020-01-30 11:28:24 +01:00
use FOS\RestBundle\Controller\Annotations\Get;
use FOS\RestBundle\Controller\Annotations\Route;
2020-04-17 12:04:37 +02:00
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
2020-01-30 11:28:24 +01:00
/**
* Class DefaultController
* @package App\Controller
2021-02-12 15:53:28 +01:00
* @Route("/",name="home_")
2020-01-30 11:28:24 +01:00
*/
class DefaultController extends EmailsController {
2020-10-26 11:39:04 +01:00
/**
* @Get(path ="/",
2021-02-12 15:53:28 +01:00
* name = "sweet_home")
2020-10-26 11:39:04 +01:00
*/
public function indexAction() {
$polls = $this->getDoctrine()->getRepository( Poll::class )->findAll();
return $this->render( 'pages/home.html.twig', [] );
2020-10-26 11:39:04 +01:00
}
2019-11-12 11:44:09 +01:00
2020-01-30 11:28:24 +01:00
}