@if($messages->count())
@foreach($messages as $ck => $cv) @if($cv->type != $userrole)
{{$cv->message}}
{{date('d/m/Y',strtotime($cv->created_at))}}
@if(isset($lastDocs[$cv->id])) @foreach($lastDocs[$cv->id] as $mk =>$mv)
{{$mv->docname}}
{{date('d/m/Y H:i a',strtotime($mv->created_at))}}
@endforeach @endif @else
{{$cv->message}}
{{date('d/m/Y',strtotime($cv->created_at))}}
@if(isset($lastDocs[$cv->id])) @foreach($lastDocs[$cv->id] as $mk =>$mv)
{{$mv->docname}}
{{date('d/m/Y H:i a',strtotime($mv->created_at))}}
@endforeach @endif @endif @endforeach
@else

No messages added

@endif @if($userrole == 'user')
Drop files here or click to upload.
@csrf
@endif @if($userrole == 'admin')
Drop files here or click to upload.
@csrf
@endif