<?php
namespace App\Controller;
use App\Entity\Article;
use App\Entity\FArticle;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class HomeController extends AbstractController
{
/**
* @Route("/", name="home")
*/
public function home() {
$articles = $this->getDoctrine()->getRepository(Article::class)->findAllParDate();
$Farticles = $this->getDoctrine()->getRepository(FArticle::class)->findAll();
return $this->render('home/home.html.twig',[
'articles'=>$articles,
'docs'=>$Farticles,
]); // renvoie vers le twig de la page d'accueill
}
}