#42 - set first collection images
This commit is contained in:
parent
8ea2b3caf1
commit
2909608b85
12 changed files with 83 additions and 31 deletions
|
|
@ -12,12 +12,7 @@ $inspirations = $page->children()->map(function ($child) {
|
|||
'status' => $child->status(),
|
||||
'cover' => $child->cover()->toFile()->url(),
|
||||
'media' => $child->media()->toFiles()->map(function ($file) {
|
||||
return [
|
||||
'url' => $file->url(),
|
||||
'alt' => $file->alt()->value(),
|
||||
'favoriteForUsers' => $file->favoriteForUsers()->value(),
|
||||
'name' => $file->filename()
|
||||
];
|
||||
return getFileData($file);
|
||||
})->values()
|
||||
];
|
||||
})->values();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue