@extends('front.layout.master') @php $authUser = Auth::user(); $sellerac = App\Store::where('user_id','=', $authUser->id)->first(); @endphp @section('title', __('My Chats') . ' | ') @section('body')
{{-- Conversations list --}}

{{ __('My Chats') }}

{{ $conversations->count() }} {{ __('conversations') }}

@forelse($conversations as $chat) @php $other = $chat->sender; $last = $chat->chat->last(); $img = $other && $other->image && file_exists(public_path() . '/images/user/' . $other->image) ? url('images/user/' . $other->image) : ($other ? Avatar::create($other->name)->toBase64() : ''); @endphp @if($img)@endif

{{ $other->name ?? __('User') }}

@if($last && $last->created_at) {{ $last->created_at->diffForHumans() }} @endif
@if($last && $last->message) {{ \Illuminate\Support\Str::limit(strip_tags($last->message), 60) }} @else {{ __('No messages yet') }} @endif
#{{ $chat->conv_id }}
@empty

{{ __('No chats yet') }}

{{ __('Start a new conversation from the right.') }}

@endforelse
{{-- Start new chat sidebar --}}

{{ __('Start new chat') }}

@foreach($users as $u) @php $img = $u->image && file_exists(public_path() . '/images/user/' . $u->image) ? url('images/user/' . $u->image) : Avatar::create($u->name)->toBase64(); @endphp
{{ $u->name }}
{{ $u->role_id == 'a' ? __('Admin') : ($u->role_id == 'v' ? __('Vendor') : __('Customer')) }}
@endforeach
{!! $users->links() !!}
@include('front.partials.change-password-modal') @endsection