mirror of
https://github.com/Karaka-Management/oms-News.git
synced 2026-02-11 22:38:40 +00:00
datetime is jsonserializable, didn't know that :)
This commit is contained in:
parent
8f89ae7551
commit
0565141f37
|
|
@ -433,15 +433,15 @@ class NewsArticle implements ArrayableInterface, \JsonSerializable
|
|||
public function toArray() : array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'title' => $this->title,
|
||||
'plain' => $this->plain,
|
||||
'content' => $this->content,
|
||||
'type' => $this->type,
|
||||
'status' => $this->status,
|
||||
'featured' => $this->featured,
|
||||
'publish' => $this->publish->format('Y-m-d H:i:s'),
|
||||
'createdAt' => $this->createdAt->format('Y-m-d H:i:s'),
|
||||
'id' => $this->id,
|
||||
'title' => $this->title,
|
||||
'plain' => $this->plain,
|
||||
'content' => $this->content,
|
||||
'type' => $this->type,
|
||||
'status' => $this->status,
|
||||
'featured' => $this->featured,
|
||||
'publish' => $this->publish,
|
||||
'createdAt' => $this->createdAt,
|
||||
'createdBy' => $this->createdBy,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user