{{-- Follow Us — ข้อมูลจาก $data['social']['list'] (Content production) --}} @php $followUsIcon = static function (int $id, ?string $name): string { $byId = match ($id) { 80 => 'ph ph-facebook-logo', 81 => 'ph ph-tiktok-logo', 82 => 'ph ph-instagram-logo', 83 => 'ph ph-globe-simple', default => null, }; if ($byId !== null) { return $byId; } $n = strtolower(trim((string) $name)); if (str_contains($n, 'facebook')) { return 'ph ph-facebook-logo'; } if (str_contains($n, 'tiktok')) { return 'ph ph-tiktok-logo'; } if (str_contains($n, 'instagram')) { return 'ph ph-instagram-logo'; } if (str_contains($n, 'youtube')) { return 'ph ph-youtube-logo'; } if (str_contains($n, 'twitter') || $n === 'x') { return 'ph ph-x-logo'; } if (str_contains($n, 'line')) { return 'ph ph-line-logo'; } if (str_contains($n, 'website') || str_contains($n, 'web') || str_contains($n, 'globe')) { return 'ph ph-globe-simple'; } return 'ph ph-link-simple'; }; @endphp @if (!empty($data['social']['list'][0]))
@foreach ($data['social']['list'] as $item) @continue(empty($item['link'] ?? null) || (int) ($item['status'] ?? 0) !== 1)
{{ $item['name'] ?? '' }}
@endforeach
@endif