mail-rss/src/Controller/AppController.php
2020-12-21 17:44:08 +01:00

31 lines
695 B
PHP

<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use App\Repository\MailingRepository;
class AppController extends AbstractController
{
/**
* @Route("/", name="home")
*/
public function home(MailingRepository $mailingRepo): Response
{
$mailings = $mailingRepo->findBy(
[
'isPublic' => true,
],
[
'label' => 'ASC',
]
);
return $this->render('app/home.html.twig', [
'mailings' => $mailings,
]);
}
}