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

35 lines
776 B
PHP
Raw Normal View History

<?php
2020-01-30 11:28:24 +01:00
namespace App\Controller;
2020-01-30 11:28:24 +01:00
use App\Entity\Owner;
2020-10-26 11:39:04 +01:00
use App\Entity\Poll;
use App\Repository\PollRepository;
2020-04-14 18:09:03 +02:00
use App\Service\MailService;
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 JMS\Serializer\Type\Exception\Exception;
2020-01-30 11:28:24 +01:00
use Symfony\Component\HttpFoundation\JsonResponse;
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
*/
2020-04-16 17:11:01 +02:00
class DefaultController extends FramadateController {
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();
2021-02-12 15:53:28 +01:00
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
}