@php // Switched off in Admin -> Pages: the band does not draw, on any layout that includes it. if (!section_on('testimonials')) { return; } /** * Customer testimonials - real approved reviews of real customers, passed from the * home controllers via Review::featured(). Each card shows the reviewer's own photo, * name, rating and words; the query returns one review per customer, so every distinct * card is a different person. When no customer has reviewed yet the section shows a * simple "No testimonials yet" empty state rather than any invented content. * * Presentation: two full-bleed rows that drift continuously in opposite directions. * Each row shows six cards, cycling the available reviewers in order (there are three * today), and each track repeats that set twice so the -50% loop is seamless. The * repeat is purely visual - no review text is invented or altered. * * @var array $testimonials rows of [author_name, avatar, rating, comment, restaurant_name] */ $testimonials = collect($testimonials ?? [])->all(); // accepts an array or a collection // Six cards per row, cycling whatever real reviews exist. $row = []; if ($testimonials) { for ($i = 0; $i < 6; $i++) { $row[] = $testimonials[$i % count($testimonials)]; } } // Second row starts mid-way through the set so the two rows never sit in lockstep. $rowB = $row ? array_merge(array_slice($row, 3), array_slice($row, 0, 3)) : []; @endphp
{{ t_raw('home.testimonials.eyebrow') }}

{{ t_raw('home.testimonials.title') }}

@if (!empty($testimonials))

{{ t_raw('home.testimonials.sub') }}

@endif
@if (empty($testimonials))

{{ t_raw('home.testimonials.empty') }}

@endif
@if (!empty($testimonials)) @php // Row 1 drifts right-to-left, row 2 left-to-right. The duplicate half of each // track is aria-hidden so screen readers hear every review exactly once. @endphp @foreach ([['cards' => $row, 'mod' => ''], ['cards' => $rowB, 'mod' => ' qm-marquee--reverse']] as $strip)
@for ($copy = 0; $copy < 2; $copy++) @foreach ($strip['cards'] as $t) @endforeach @endfor
@endforeach @endif