@php /** * Image-first testimonial card (home-garden pattern). * Mirrors html/home-garden.html lines 2727-2853 — `testimonial-v03 hover-img4`: * left/top photo with quick-view hover icon, then star-rating + author block * (with verified-buyer badge) + capitalized quote. * * Falls back to the testimonial plugin's seeded records via the parent * partials/shortcodes/testimonials/index.blade.php; uses each record's * `avatar` field as the photo. Add a `product_image` tab in the shortcode * config to override per-slide. */ $autoplay = ($shortcode->autoplay ?? 'yes') === 'yes'; @endphp
@foreach ($items as $item) @php $photo = $item['product_image'] ?? $item['avatar'] ?? null; $name = $item['name'] ?? ''; $role = $item['role'] ?? ''; $quote = $item['content'] ?? ''; $rating = (int) ($item['rating'] ?? 5); $rating = max(0, min(5, $rating)); @endphp
@if ($photo)
{!! RvMedia::image($photo, $name, 'medium', false, ['width' => 450, 'height' => 312, 'loading' => 'lazy']) !!}
@endif
@for ($s = 0; $s < $rating; $s++) @endfor
@if ($name)
{!! BaseHelper::clean($name) !!}
{{ $role ?: __('Verified Buyer') }}
@endif @if ($quote)
“{!! BaseHelper::clean($quote) !!}”
@endif
@endforeach