magnetico-web/src/Controller/MainController.php

17 lines
419 B
PHP
Raw Normal View History

<?php
namespace App\Controller;
use App\Repository\TorrentRepository;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
class MainController extends Controller
{
public function index(TorrentRepository $repo): Response
{
return $this->render('index.html.twig', [
'torrentsCount' => $repo->getTorrentsTotalCount(),
]);
}
}