userUnreadMessagesCount(Auth::id()) > 0 ? 'class=table-info' : '' }}>
{{ $thread->subject }} |
{{ $thread->creator()->first_name.' '.$thread->creator()->last_name }}
|
@if($thread->participants()->count() > 2)
Group Chat
@else
@foreach($thread->participants()->get() as $participant)
@if(!empty($participant->user->id))
@if($participant->user?->id != Auth::id())
{{ $participant->user->first_name.' '.$participant->user->last_name }}
@endif
@endif
@endforeach
@endif
|
{{ $thread->created_at->diffForHumans() }} |
{{ $thread->userUnreadMessagesCount(Auth::id()) }} unread |
View
|
@endforeach