#42 - set first collection images

This commit is contained in:
isUnknown 2024-12-17 16:12:51 +01:00
parent 8ea2b3caf1
commit 2909608b85
12 changed files with 83 additions and 31 deletions

View file

@ -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();