@props([ 'title' => __('home.testimonials.title'), 'subtitle' => __('home.testimonials.subtitle'), // Expect an array or collection of testimonial models/arrays 'testimonials' => [], ])

{{ $title }}

{{ $subtitle }}

@if(!empty($testimonials) && count($testimonials))
@foreach($testimonials as $testimonial)
@php $image = is_array($testimonial) ? ($testimonial['picture'] ?? null) : $testimonial->picture ?? null; $name = is_array($testimonial) ? ($testimonial['name'] ?? '') : $testimonial->name ?? ''; $position = is_array($testimonial) ? ($testimonial['position'] ?? '') : $testimonial->position ?? ''; $quote = is_array($testimonial) ? ($testimonial['testimonial_text'] ?? '') : $testimonial->testimonial_text ?? ''; @endphp @if($image) {{ $name }} @endif

{{ $name }}

@if($position)

{{ $position }}

@endif @if($quote)

{{ $quote }}

@endif
@endforeach
@else

No testimonials available at the moment.

@endif