2018-06-20 23:37:35 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Controller;
|
|
|
|
|
|
|
|
use App\Repository\TorrentRepository;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
2018-06-22 19:45:17 +00:00
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
2018-06-20 23:37:35 +00:00
|
|
|
|
|
|
|
class MainController extends Controller
|
|
|
|
{
|
2018-06-22 19:45:17 +00:00
|
|
|
public function index(TorrentRepository $repo): Response
|
2018-06-20 23:37:35 +00:00
|
|
|
{
|
|
|
|
return $this->render('index.html.twig', [
|
|
|
|
'torrentsCount' => $repo->getTorrentsTotalCount(),
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|