<?php
namespace App\Controller\Front;
use App\Repository\PostRepository;
use App\Services\SocialService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class IndexController extends AbstractController
{
/**
* @Route("/", name="front_home")
*/
public function home(PostRepository $postRepository, SocialService $socialService)
{
return $this->render('front/home.html.twig', [
'posts' => $postRepository->findBy([], ['id' => 'DESC'], 3),
'imagesInsta' => $socialService->displayInstagram()
]);
}
}