From 466dbb542a50e9dfef181df8d883093e9435bb8b Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 29 Dec 2019 14:18:46 +0100 Subject: [PATCH] datetime is jsonserializable, didn't know that :) --- Models/Report.php | 2 +- Models/Template.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Models/Report.php b/Models/Report.php index 694c988..6441241 100644 --- a/Models/Report.php +++ b/Models/Report.php @@ -290,7 +290,7 @@ class Report implements \JsonSerializable return [ 'id' => $this->id, 'createdBy' => $this->createdBy, - 'createdAt' => $this->createdAt->format('Y-m-d H:i:s'), + 'createdAt' => $this->createdAt, 'name' => $this->title, 'description' => $this->description, 'status' => $this->status, diff --git a/Models/Template.php b/Models/Template.php index cc41985..e7cd45f 100644 --- a/Models/Template.php +++ b/Models/Template.php @@ -384,7 +384,7 @@ class Template implements \JsonSerializable return [ 'id' => $this->id, 'createdBy' => $this->createdBy, - 'createdAt' => $this->createdAt->format('Y-m-d H:i:s'), + 'createdAt' => $this->createdAt, 'name' => $this->name, 'description' => $this->description, 'status' => $this->status,