31 lines
695 B
PHP
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,
|
|
]);
|
|
}
|
|
}
|