@php $locale = $locale ?? app()->getLocale(); // Field-name compatibility (Classic → Golden fallbacks). $eyebrow = $data['eyebrow'][$locale] ?? $data['subheading'][$locale] ?? ''; $heading = $data['heading'][$locale] ?? ''; $renderedHeading = preg_replace_callback('/__(.+?)__/u', function ($m) { return ''.e($m[1]).''; }, e($heading)); $items = $repeatedContents->map(function ($rc) use ($locale) { $c = $rc->content_data ?? []; return [ 'body' => $c['comment_text'][$locale] ?? '', 'name' => $c['client_name'][$locale] ?? '', 'role' => $c['client_position'][$locale] ?? '', 'photo' => !empty($c['client_image']) ? asset($c['client_image']) : '', 'rating'=> (int) ($c['rating'] ?? 5), ]; })->values(); $first = $items->first() ?? ['body' => '', 'name' => '', 'role' => '', 'photo' => '', 'rating' => 5]; @endphp
@if($eyebrow)
{{ $eyebrow }}
@endif @if($heading)

{!! $renderedHeading !!}

@endif
“
@for($i = 1; $i <= 5; $i++) @endfor
{{ $first['body'] }}
{{ $first['name'] }}
{{ $first['role'] }}
@foreach($items as $idx => $_) @endforeach