public getEvolutionCounts ( $period = 50 ) : array | ||
return | array |
public function getEvolutionCounts($period = 50)
{
return $this->createQueryBuilder('s')->select('s.date, COUNT(s.id) AS value')->where('s.date > :period')->groupBy('s.date')->orderBy('s.date', 'asc')->setParameter('period', new \DateTime(sprintf('%d days ago', $period)))->getQuery()->execute();
}