public function getEntriesFromLastDays($days)
    {
        $from = new DateTime();
        $from->modify('-' . $days . ' days');

        return $this
            ->createQueryBuilder('e')
            ->where('e.createdAt >= :from')
            ->setParameters([
                'from' => $from,
            ])
            ->getQuery()
            ->getResult();
    }
public function getEntriesFromLastDays($days)
    {
        $from = new DateTime();
        $from->modify('-' . $days . ' days');

        return $this
            ->createQueryBuilder('e')
            ->where('e.createdAt >= :from')
            ->setParameters([
                'from' => $from,
            ])
            ->getQuery()
            ->getResult();
    }
public function getEntriesFromLastDays ( $ days ) { $ from = new DateTime ( ) ; $ from -> modify ( '-' . $ days . ' days' ) ; return $ this -> createQueryBuilder ( 'e' ) -> where ( 'e.createdAt >= :from' ) -> setParameters ( [ 'from' => $ from , ] ) -> getQuery ( ) -> getResult ( ) ; }
Load entries from last X days.

@param int $days Days

@return EntryInterface[] Entries
Load entries from last X days .