magnetico-web/src/Controller/MainController.php
2018-06-22 22:45:17 +03:00

17 lines
419 B
PHP

<?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(),
]);
}
}