First Widget Bar + Number of notification unread. All is hardcoded

This commit is contained in:
Lucas Silva
2023-05-16 02:17:36 +02:00
parent 790c7f6724
commit b9e580af9a
7 changed files with 169 additions and 107 deletions

View File

@@ -113,4 +113,17 @@ final class AccompanyingPeriodRepository implements ObjectRepository
return $qb;
}
public function countByUserGroupedByMonth(User $user): array
{
$qb = $this->createQueryBuilder('a');
$qb->select()
->addSelect('COUNT(a.id) AS count')
->andWhere('a.user = :user')
->setParameter('user', $user)
->groupBy('month')
->orderBy('month', 'ASC');
return $qb->getQuery()->getResult();
}
}