src/Controller/IndexController.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\RedirectResponse;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. use App\Entity\Media;
  8. use App\Repository\MediaRepository;
  9. class IndexController extends AbstractController
  10. {
  11.     /**
  12.      * @Route("/", name="app_index")
  13.      */
  14.     public function index(MediaRepository $mediaRepository): Response
  15.     {
  16.         $media $mediaRepository->findByFiletype('video');
  17.         return $this->render('index/index.html.twig', [
  18.             'media' => $media,
  19.         ]);
  20.     }
  21. }