@php
$dateLabel = '';
$newMessageLabel = "";
$labelMessage = 0;
@endphp
@if(!isset($onlyOne))
@foreach($mess as $mes)
@php
$medias = json_decode($mes->media, true);
if($mes->uid != auth()->user()->id){
$userMes = Helper::getUserInfo($mes->uid);
}
$labelMessage += 1;
@endphp
@if($dateLabel != Helper::rdate('d M',$mes->created_at, 1))
@php $dateLabel = Helper::rdate('d M',$mes->created_at, 1); @endphp
@endif
@if($newMessageLabel != 'isNew' && $mes->uid != auth()->user()->id && $mes->view == 0)
@php $newMessageLabel = 'isNew'; @endphp
@endif
@if(!empty($medias['photo']) || !empty($medias['video']) || !empty($medias['file']))
@endif
@if($mes->uid != auth()->user()->id)
{{ $userMes->name }}
@endif
{{ Helper::rdate('H:i',$mes->created_at, 1) }}
@endforeach
@else
@php
$medias = json_decode($mes->media, true);
@endphp
@if(!empty($medias['photo']) || !empty($medias['video']) || !empty($medias['file']))
@endif
{{ Helper::rdate('H:i',$mes->created_at, 1) }}
@endif
@isset($onlyMessages)
@endisset