Eigene Fotokategorie fuer Grundrisse und Plaene, nie in Galerien
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8bcda9a4bc
commit
d02f3e05c7
7 files changed
+85
-4
No files matched your search
@@ -53,7 +53,7 @@ public function data(Theme $theme, array $data): array
|
||||
{
|
||||
$fallback = isset($data['photo_id'])
|
||||
? Photo::find($data['photo_id'])
|
||||
: Photo::query()->published()->when($theme->property(), fn ($query, $property) => $query->whereBelongsTo($property))->first() ?? Photo::query()->published()->first();
|
||||
: Photo::query()->published()->forGalleries()->when($theme->property(), fn ($query, $property) => $query->whereBelongsTo($property))->first() ?? Photo::query()->published()->forGalleries()->first();
|
||||
$featuredOffer = ($data['show_offer'] ?? true) && $theme->property()
|
||||
? app(OfferShowcase::class)->current($theme->property(), limit: 1, featuredOnly: true)->first()
|
||||
: null;
|
||||
|
||||
Reference in new issue
Block a user