@php $social = $home['social_proof'] ?? []; @endphp
@if($caseStudies->isNotEmpty())
@include('pages.home._section-head', [ 'kicker' => $social['case_studies_kicker'] ?? 'Case studies', 'title' => $social['case_studies_title'] ?? '', 'href' => route('case-studies.index'), 'linkText' => $social['case_studies_link_text'] ?? 'All case studies', 'centered' => true, ]) @php $featured = $caseStudies->first(); @endphp @if($caseStudies->count() > 1)
@foreach($caseStudies->skip(1)->take(2) as $study)

{{ $study->client_name }}

{{ $study->title }}

{{ Str::limit($study->summary, 120) }}

@endforeach
@endif
@endif @php use App\Support\VideoEmbed; $posterImages = [ asset('images/home/client-success.png'), asset('images/home/professional-support.png'), asset('images/home/team-support.png'), asset('images/home/team-collaboration.jpg'), asset('images/home/team-planning.jpg'), asset('images/home/business-meeting.jpg'), asset('images/home/modern-office.jpg'), asset('images/home/client-success.png'), ]; $fallbackVideos = [ [ 'name' => 'Sarah Mitchell', 'role' => 'Managing Partner', 'company' => 'Mitchell Legal Group', 'quote' => 'Apex Admins transformed our operations. Our virtual assistant handles everything seamlessly.', 'rating' => 5, 'embed' => VideoEmbed::parse('https://www.youtube.com/watch?v=8jPQjQBb6xo')['embed'] ?? null, 'poster' => $posterImages[0], 'initials' => 'SM', ], [ 'name' => 'David Chen', 'role' => 'Principal', 'company' => 'Chen & Associates', 'quote' => 'We scaled from two to eight staff without adding office overhead.', 'rating' => 5, 'embed' => VideoEmbed::parse('https://www.youtube.com/watch?v=VUwfm0aQpNg')['embed'] ?? null, 'poster' => $posterImages[1], 'initials' => 'DC', ], [ 'name' => 'Emma Walsh', 'role' => 'Director', 'company' => 'Walsh Property Group', 'quote' => 'Our admin support runs like clockwork. Inquiries are handled within the hour.', 'rating' => 5, 'embed' => VideoEmbed::parse('https://www.youtube.com/watch?v=xmYekD6-FL8')['embed'] ?? null, 'poster' => $posterImages[2], 'initials' => 'EW', ], [ 'name' => 'James O\'Brien', 'role' => 'Founder', 'company' => 'O\'Brien Accounting', 'quote' => 'We cut admin costs by 55% while improving response times for clients.', 'rating' => 5, 'embed' => VideoEmbed::parse('https://www.youtube.com/watch?v=8jPQjQBb6xo')['embed'] ?? null, 'poster' => $posterImages[3], 'initials' => 'JO', ], [ 'name' => 'Lisa Nguyen', 'role' => 'Operations Manager', 'company' => 'Nguyen Health Clinics', 'quote' => 'Patient scheduling and billing are finally under control — our team can breathe again.', 'rating' => 5, 'embed' => VideoEmbed::parse('https://www.youtube.com/watch?v=VUwfm0aQpNg')['embed'] ?? null, 'poster' => $posterImages[4], 'initials' => 'LN', ], [ 'name' => 'Michael Torres', 'role' => 'CEO', 'company' => 'Torres Digital', 'quote' => 'Hiring through Apex was faster than any recruiter we have used before.', 'rating' => 5, 'embed' => VideoEmbed::parse('https://www.youtube.com/watch?v=xmYekD6-FL8')['embed'] ?? null, 'poster' => $posterImages[5], 'initials' => 'MT', ], [ 'name' => 'Rachel Foster', 'role' => 'Director', 'company' => 'Foster E-commerce', 'quote' => 'Our VA handles customer support across three time zones flawlessly.', 'rating' => 5, 'embed' => VideoEmbed::parse('https://www.youtube.com/watch?v=8jPQjQBb6xo')['embed'] ?? null, 'poster' => $posterImages[6], 'initials' => 'RF', ], [ 'name' => 'Tom Bradley', 'role' => 'Managing Director', 'company' => 'Bradley Construction', 'quote' => 'Project coordination used to be a bottleneck — not anymore.', 'rating' => 5, 'embed' => VideoEmbed::parse('https://www.youtube.com/watch?v=VUwfm0aQpNg')['embed'] ?? null, 'poster' => $posterImages[7], 'initials' => 'TB', ], ]; $cmsVideos = $testimonials->isNotEmpty() ? $testimonials->take(8)->values()->map(function ($t, $i) use ($posterImages) { $embed = VideoEmbed::parse($t->video_url); $poster = $posterImages[$i % count($posterImages)]; if ($embed && ! empty($embed['thumbnail'])) { $poster = $embed['thumbnail']; } return [ 'name' => $t->name, 'role' => $t->role ?? '', 'company' => $t->company ?? '', 'quote' => \Illuminate\Support\Str::limit($t->content, 200), 'rating' => $t->rating ?? 5, 'embed' => $embed['embed'] ?? null, 'poster' => $poster, 'initials' => collect(explode(' ', $t->name))->map(fn ($w) => strtoupper(substr($w, 0, 1)))->take(2)->join(''), ]; })->all() : []; $videoTestimonials = $cmsVideos; if (count($videoTestimonials) < 8) { $videoTestimonials = array_merge( $videoTestimonials, array_slice($fallbackVideos, count($videoTestimonials), 8 - count($videoTestimonials)) ); } $responsiveImages = app(\App\Support\ResponsiveImages::class); $videoTestimonials = array_map( fn (array $video) => $video + ['posterSrcset' => $responsiveImages->srcsetFor((string) ($video['poster'] ?? ''))], $videoTestimonials, ); @endphp @include('pages.home._section-head', [ 'kicker' => $social['testimonials_kicker'] ?? 'Video testimonials', 'title' => $social['testimonials_title'] ?? '', 'lead' => $social['testimonials_lead'] ?? '', 'centered' => true, ])
@foreach(($social['trust_metrics'] ?? []) as $i => $metric) @if($i > 0) @endif
{{ $metric['value'] ?? '' }} {{ $metric['label'] ?? '' }}
@endforeach