@php $dateLabel = ''; $newMessageLabel = ""; $labelMessage = 0; @endphp @if(!isset($onlyOne)) @foreach($mess as $mes) @php $medias = json_decode($mes->media, true); $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(count($medias['photo']) == 1) @endif
    @if(!empty($medias['photo']) && count($medias['photo']) > 1) @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) }}
@endforeach @else @php $medias = json_decode($mes->media, true); @endphp
@if(!empty($medias['photo']) || !empty($medias['video']) || !empty($medias['file']))
@if(count($medias['photo']) == 1) @endif
    @if(!empty($medias['photo']) && count($medias['photo']) > 1) @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