@if(isset($room)) @php $timeDifference = (strtotime(\Carbon\Carbon::now()->format('H:i:s')) - strtotime(\Carbon\Carbon::parse($room->date)->addSeconds($room->room_timer)->format('H:i:s') )) ; @endphp @if(isset($messages)) @if(\Carbon\Carbon::parse($room->date) < \Carbon\Carbon::now()) @if(Carbon\Carbon::now()->subSeconds($room->timer) >= \Carbon\Carbon::parse($room->date)) @if( $timeDifference < 0 )
sender_id == \Auth::user()->id) class="chat-p-right" @else class="chat-p-left"@endif >{{$message->message}}