@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
{{ $dateLabel }}
@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']))
    @if(!empty($medias['photo'])) @foreach($medias['photo'] as $photo)
  • @endforeach @endif @if(!empty($medias['video']))
  • @endif @if(!empty($medias['file'])) @foreach($medias['file'] as $file)
  • @endforeach @endif
@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']))
    @if(!empty($medias['photo'])) @foreach($medias['photo'] as $photo)
  • @endforeach @endif @if(!empty($medias['video']))
  • @endif @if(!empty($medias['file'])) @foreach($medias['file'] as $file)
  • @endforeach @endif
@endif
{{ Helper::rdate('H:i',$mes->created_at, 1) }}
@endif @isset($onlyMessages) @endisset