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

@@ -115,4 +115,15 @@ class DownloadRepository extends ServiceEntityRepository
return $query->getResult();
}
public function latest(int $limit = 1)
{
return $this->createQueryBuilder('d')
->andWhere('d.status IN (:statuses)')
->setParameter('statuses', ['Complete'])
->setMaxResults($limit)
->orderBy('d.id', 'DESC')
->getQuery()
->getResult();
}
}