@php $facebook = \App\Models\SiteSetting::get('social_facebook', ''); $instagram = \App\Models\SiteSetting::get('social_instagram', ''); $twitter = \App\Models\SiteSetting::get('social_twitter', ''); $linkedin = \App\Models\SiteSetting::get('social_linkedin', ''); $youtube = \App\Models\SiteSetting::get('social_youtube', ''); $tiktok = \App\Models\SiteSetting::get('social_tiktok', ''); $whatsapp = \App\Models\SiteSetting::get('whatsapp_number', '') ?: \App\Models\SiteSetting::get('phone_primary', ''); $whatsappMessage = urlencode('Hello! I would like to request a consultation with Shavhani Attorneys.'); $links = array_values(array_filter([ $facebook ? ['name' => 'Facebook', 'href' => $facebook, 'bg' => 'bg-[#1877F2]', 'icon' => 'facebook'] : null, $instagram ? ['name' => 'Instagram', 'href' => $instagram, 'bg' => 'bg-[#E4405F]', 'icon' => 'instagram'] : null, $twitter ? ['name' => 'X', 'href' => $twitter, 'bg' => 'bg-black', 'icon' => 'x'] : null, $linkedin ? ['name' => 'LinkedIn', 'href' => $linkedin, 'bg' => 'bg-[#0A66C2]', 'icon' => 'linkedin'] : null, $youtube ? ['name' => 'YouTube', 'href' => $youtube, 'bg' => 'bg-[#FF0000]', 'icon' => 'youtube'] : null, $tiktok ? ['name' => 'TikTok', 'href' => $tiktok, 'bg' => 'bg-[#111111]', 'icon' => 'tiktok'] : null, $whatsapp ? ['name' => 'WhatsApp', 'href' => 'https://wa.me/' . str_replace([' ', '-', '(', ')'], '', $whatsapp) . '?text=' . $whatsappMessage, 'bg' => 'bg-[#25D366]', 'icon' => 'whatsapp'] : null, ])); @endphp @if(count($links) > 0)
Open social links
@foreach($links as $index => $link) @if($link['icon'] === 'facebook') @elseif($link['icon'] === 'instagram') @elseif($link['icon'] === 'x') @elseif($link['icon'] === 'linkedin') @elseif($link['icon'] === 'youtube') @elseif($link['icon'] === 'tiktok') @else @endif @endforeach
@endif