$trans['meta']['seo_title'], 'metaDescription' => $trans['meta']['seo_description'], 'heroVideoSrc' => $trans['hero']['video_src'], 'heroMobileVideoSrc' => $trans['hero']['mobile_video_src'], 'stats' => $trans['chiffres_cles']['stats'], 'brands' => $trans['marques']['brands'], 'testimonials' => $this->getTestimonials($trans), 'featuredArticles' => $this->getFeaturedArticles(), 'schemas' => [ $schemaOrg->setWebPage() ->headline($trans['meta']['seo_title']) ->description($trans['meta']['seo_title']) ->name($trans['meta']['seo_title']) ->isAccessibleForFree(true) ->keywords(['page']) ->dateCreated(new \DateTimeImmutable('2026-09-03')) ->dateModified(new \DateTimeImmutable('2026-09-03')) ->datePublished(new \DateTimeImmutable('2026-09-03')), ], ]); } /** * @param array $trans * @return array> */ private function getTestimonials(array $trans): array { /** @var array> $testimonials */ $testimonials = $trans['rejoindre']['testimonials'] ?? []; return collect($testimonials) ->map(fn($t) => [ 'quote' => $t['quote'], 'authorName' => $t['author_name'], 'authorRole' => $t['author_role'], 'authorPhoto' => $t['author_photo'], 'logo' => $t['logo'], ])->all(); } /** * @return array> */ private function getFeaturedArticles(): array { $newsTrans = trans('news_page'); return collect(NewsRepository::all()) ->take(3) ->map(fn($a) => [ 'slug' => $a['slug'], 'title' => $a['title'], 'shortTitle' => $a['shortTitle'], 'date' => $a['date'], 'rotation' => $a['rotation'], 'category' => $newsTrans['themes'][$a['theme']], ]) ->values() ->all(); } }