@php //filter out chat $chats = (isset($__site_details['chat']) && !empty($__site_details['chat']['whatsapp'])) ? $__site_details['chat']['whatsapp'] : []; $chats_collection = collect($chats); $filtered_chats = $chats_collection->filter(function ($value, $key) { return !empty($value); }); //filter out contact us to be included in chat widget $contact_us = (isset($__site_details['chat']) && !empty($__site_details['chat']['mobile'])) ? $__site_details['chat']['mobile'] : []; $contact_us_collection = collect($contact_us); $filtered_contact = $contact_us_collection->filter(function ($value, $key) { return !empty($value); }); //filter out mail us to be included in chat widget $mail_us = (isset($__site_details['chat']) && !empty($__site_details['chat']['mail'])) ? $__site_details['chat']['mail'] : []; $mail_us_collection = collect($mail_us); $filtered_mail = $mail_us_collection->filter(function ($value, $key) { return !empty($value); }); $filtered_socials = []; if(isset($__site_details['chat']) && !empty($__site_details['chat']['messanger_link'])) { $filtered_socials['messanger_link'] = $__site_details['chat']['messanger_link']; } if(isset($__site_details['chat']) && !empty($__site_details['chat']['telegram'])) { $filtered_socials['telegram'] = $__site_details['chat']['telegram']; } @endphp @if(count($filtered_chats) > 0 || count($filtered_contact) > 0 || count($filtered_mail) > 0 || count($filtered_socials) > 0)
@if(count($filtered_chats) > 0) @foreach($filtered_chats as $chat) @if(!empty($chat))

Whatsapp

Chat on Whatsapp

@endif @endforeach @endif @if(!empty($filtered_socials['messanger_link']))

FB Messenger

Get connected with Facebook

@endif @if(!empty($filtered_socials['telegram']))

Telegram

Chat on Telegram

@endif @if(count($filtered_mail) > 0) @foreach($filtered_mail as $chat)

Email

Send Email

@endforeach @endif @if(count($filtered_contact) > 0) @foreach($filtered_contact as $chat) @if(!empty($chat))

Call

Talk with us over telephone

@endif @endforeach @endif
@endif