From dcfa95998000af893c54424bf150f701b12b8616 Mon Sep 17 00:00:00 2001 From: Mischa Spelt Date: Sat, 16 Sep 2017 16:44:11 +0200 Subject: [PATCH] Agenda toont geen evenementen in verleden meer --- api/app/Http/Controllers/NewsController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/app/Http/Controllers/NewsController.php b/api/app/Http/Controllers/NewsController.php index c524c3b..897eafe 100644 --- a/api/app/Http/Controllers/NewsController.php +++ b/api/app/Http/Controllers/NewsController.php @@ -80,10 +80,10 @@ QUERY; * Agendaberichten ophalen */ public function calendarlist(Request $request) { - $monday = new \DateTime('last Monday'); + $today = new \DateTime('today'); $agendaItems = app('db')->select(self::$BASE_SQL - . ' AND `news`.`enddt` >= :monday ' - . ' ORDER BY `news`.`startdt` ASC, `news`.`enddt` ASC', ['category' => self::$CALENDAR_CATEGORY, 'monday' => $monday]); + . ' AND `news`.`enddt` >= :today ' + . ' ORDER BY `news`.`startdt` ASC, `news`.`enddt` ASC', ['category' => self::$CALENDAR_CATEGORY, 'today' => $today]); $result = array(); foreach($agendaItems as $agendaItem) {