@extends('layouts.app') @section('title', 'Messages') @section('content')
@if($threads->count() > 0) @foreach($threads as $thread) userUnreadMessagesCount(Auth::id()) > 0 ? 'class=table-info' : '' }}> @endforeach
Subject Creator Participants Created Date Unread Messages Actions
{{ $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
@else
You currently have no messages to display.
@endif
@endsection @push('styles') @endpush