fix date format
This commit is contained in:
parent
fceacaeed6
commit
dfda911664
2 changed files with 3 additions and 3 deletions
|
|
@ -4,9 +4,9 @@ $collections = $page->children()->map(function ($child) {
|
||||||
return [
|
return [
|
||||||
'title' => $child->title()->value(),
|
'title' => $child->title()->value(),
|
||||||
'new' => $child->new()->value() === "true" ? true : false,
|
'new' => $child->new()->value() === "true" ? true : false,
|
||||||
'date' => $child->date()->toDate('Y-m-d'),
|
'date' => $child->date()->toDate('Y-MM-d'),
|
||||||
'url' => $child->url(),
|
'url' => $child->url(),
|
||||||
'modified' => $child->modified('Y-m-d'),
|
'modified' => $child->modified('Y-MM-d'),
|
||||||
'status' => $child->status(),
|
'status' => $child->status(),
|
||||||
'cover' => $child->cover()->toFile()->url(),
|
'cover' => $child->cover()->toFile()->url(),
|
||||||
'media' => $child->media()->toFiles()->map(function ($file) {
|
'media' => $child->media()->toFiles()->map(function ($file) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ $children = $page->children()->map(function ($child) {
|
||||||
return [
|
return [
|
||||||
'title' => $child->title()->value(),
|
'title' => $child->title()->value(),
|
||||||
'url' => $child->url(),
|
'url' => $child->url(),
|
||||||
'modified' => $child->modified('Y-m-d'),
|
'modified' => $child->modified('Y-MM-d'),
|
||||||
'status' => $child->status(),
|
'status' => $child->status(),
|
||||||
'logo' => $child->client()->toPage()->logo()->toFile()->url()
|
'logo' => $child->client()->toPage()->logo()->toFile()->url()
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue