1
0
mirror of https://framagit.org/tykayn/date-poll-api synced 2023-08-25 08:23:11 +02:00
date-poll-api/src/Controller/DefaultController.php
tykayn aab2d74b19 Revert "add graphql bundle"
rearrange controllers for api and no api

This reverts commit 8fbd5462
2021-04-21 11:02:24 +02:00

35 lines
774 B
PHP
Executable File

<?php
namespace App\Controller;
use App\Entity\Owner;
use App\Entity\Poll;
use App\Repository\PollRepository;
use App\Service\MailService;
use FOS\RestBundle\Controller\Annotations\Get;
use FOS\RestBundle\Controller\Annotations\Route;
use JMS\Serializer\Type\Exception\Exception;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
/**
* Class DefaultController
* @package App\Controller
* @Route("/",name="home_")
*/
class DefaultController extends EmailsController {
/**
* @Get(path ="/",
* name = "sweet_home")
*/
public function indexAction() {
$polls = $this->getDoctrine()->getRepository( Poll::class )->findAll();
return $this->render( 'pages/home.html.twig', [] );
}
}