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
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:
@@ -1,7 +1,8 @@
|
|||||||
@extends('layouts.shop')
|
@extends('layouts.shop')
|
||||||
@section('title', $product->name)
|
@section('title', $product->name)
|
||||||
@section('content')
|
@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 --}}
|
{{-- Bilder --}}
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user