wip-feat: lists active & recent downloads on landing page

This commit is contained in:
2025-04-25 13:30:15 -05:00
parent c12a33de86
commit 6a2567bf98
5 changed files with 72 additions and 74 deletions

View File

@@ -2,17 +2,23 @@
namespace App\Controller;
use App\Download\Framework\Repository\DownloadRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
final class IndexController extends AbstractController
{
public function __construct(
private readonly DownloadRepository $downloadRepository,
) {}
#[Route('/', name: 'app_index')]
public function index(): Response
{
return $this->render('index/index.html.twig', [
'controller_name' => 'IndexController',
'active_downloads' => [],
'recent_downloads' => $this->downloadRepository->latest(5)
]);
}
}