Fix product main image: use @php + @json to avoid quote conflicts in Alpine x-data
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 6s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 07:06:08 +02:00
co-authored by Claude Sonnet 4.6
parent 714807f648
commit 0a98740877
+2 -1
View File
@@ -1,7 +1,8 @@
@extends('layouts.shop')
@section('title', $product->name)
@section('content')
<div class="grid grid-cols-1 md:grid-cols-2 gap-10 mb-12" x-data="productDetail(@json($product->variants), '{{ $product->images->count() ? asset('storage/'.$product->images->first()->path) : '' }}')">
@php $firstImageUrl = $product->images->count() ? asset('storage/'.$product->images->first()->path) : ''; @endphp
<div class="grid grid-cols-1 md:grid-cols-2 gap-10 mb-12" x-data="productDetail(@json($product->variants), @json($firstImageUrl))">
{{-- Bilder --}}
<div>