Eigene Fotokategorie fuer Grundrisse und Plaene, nie in Galerien

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-10-29 18:43:02 +01:00
1 parent 8bcda9a4bc
commit d02f3e05c7
7 files changed
+85 -4

No files matched your search

+1 -1
View File
@@ -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;