@if (isset($chattings))
@foreach($chattings as $key => $chat)
@if ($chat->sent_by_seller || $chat->sent_by_admin || $chat->sent_by_delivery_man)
@if(isset($shop->delivery_man_id))
 }})
@elseif(isset($last_chat->shop))
 }})
@elseif(isset($chat->sent_by_admin))
, type: 'shop') }})
@endif
@if($chat->message)
{{$chat->message}}
@endif
@if (json_decode($chat['attachment']) !=null)
@foreach (json_decode($chat['attachment']) as $index => $photo)
@endforeach
@endif
{{$chat->created_at->diffForHumans()}}
@else
@if($chat->message)
{{$chat->message}}
@endif
@if (json_decode($chat['attachment']) !=null)
@foreach (json_decode($chat['attachment']) as $index => $photo)
@endforeach
@endif
{{ $chat->created_at->diffForHumans() }}
@endif
@endForeach
@endif