@extends('layouts.app_new') @section('title') Chat @endsection @section('content')

Users

@if(isset($user->id))
@if(!empty($user->image)) image @else image @endif
@endif @foreach($usersChats as $usersChat) @if(Auth::id()==$usersChat->user_id_1 ) @php $user_id = "user2"; @endphp @else @php $user_id = "user1"; @endphp @endif @if(!isset($user->id) || ($user->id != $usersChat->{$user_id}->id))
@if(!empty($usersChat->{$user_id}->image)) image @else image @endif
count_unread <= 0) style="display: none;border-radius:50%" @endif id="chat-number-{{$usersChat->id}}" style="border-radius:50%">{{$usersChat->count_unread}}
@endif @endforeach

Groups

@foreach($groups as $group) @endforeach
@endsection @section('script') @endsection