Revert "Show talks that have been on past days"
This reverts commit 700e7b478b
.
This commit is contained in:
parent
700e7b478b
commit
919615ccb8
|
@ -17,13 +17,13 @@ final class TalkCounter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCount(): int {
|
public function getCount(): int {
|
||||||
$yesterday = Carbon::yesterday()->format('Y-m-d H:i:s');
|
$today = Carbon::today()->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
return $this->talkRepository
|
return $this->talkRepository
|
||||||
->findAllPublished()
|
->findAllPublished()
|
||||||
->getEvents()
|
->getEvents()
|
||||||
->filter(fn(ParagraphInterface $event) => $event->get('field_date')
|
->filter(fn(ParagraphInterface $event) => $event->get('field_date')
|
||||||
->getString() <= $yesterday)
|
->getString() <= $today)
|
||||||
->count();
|
->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue