src/Controller/Front/IndexController.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Front;
  3. use App\Repository\PostRepository;
  4. use App\Services\SocialService;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. class IndexController extends AbstractController
  8. {
  9.     /**
  10.      * @Route("/", name="front_home")
  11.      */
  12.     public function home(PostRepository $postRepositorySocialService $socialService)
  13.     {
  14.         return $this->render('front/home.html.twig', [
  15.             'posts' => $postRepository->findBy([], ['id' => 'DESC'], 3),
  16.             'imagesInsta' => $socialService->displayInstagram()
  17.         ]);
  18.     }
  19. }