magnetico-web/src/Controller/MainController.php

17 lines
429 B
PHP
Raw Normal View History

<?php
namespace App\Controller;
use App\Magnetico\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(),
]);
}
}