Toggle favorite working
This commit is contained in:
parent
5e3f4ec621
commit
4ea2871c6d
13 changed files with 300 additions and 169 deletions
|
|
@ -7,12 +7,16 @@ $inspirations = $page->children()->map(function ($child) {
|
|||
'new' => $child->new()->value() === "true" ? true : false,
|
||||
'date' => $child->date()->toDate('Y-MM-d'),
|
||||
'url' => $child->url(),
|
||||
'uri' => $child->uri(),
|
||||
'modified' => $child->modified('Y-MM-d'),
|
||||
'status' => $child->status(),
|
||||
'cover' => $child->cover()->toFile()->url(),
|
||||
'media' => $child->media()->toFiles()->map(function ($file) {
|
||||
return [
|
||||
'url' => $file->url()
|
||||
'url' => $file->url(),
|
||||
'ald' => $file->alt()->value(),
|
||||
'favoriteForUsers' => $file->favoriteForUsers()->value(),
|
||||
'name' => $file->filename()
|
||||
];
|
||||
})->values()
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue