@extends('layouts.admin') @section('style') @endsection @section('content')

@if (request('customer_id')) @php $customer_search = App\Models\User::where('type' , 'customer')->where('id' , request('customer_id'))->first(); @endphp @if($customer_search) {{ __("messages.User") }} : {{ $customer_search->name }} @endif @endif @if (request('vendor_id')) @php $vendor_search = App\Models\User::where('type' , 'vendor')->where('id' , request('vendor_id'))->first(); @endphp @if($vendor_search) {{ __("messages.Advisor") }} : {{ $vendor_search->name }} @endif @endif @if (request('from_date')) {{ __('messages.From date') }} : {{ request('from_date') }} @endif @if (request('to_date')) {{ __('messages.To date') }} : {{ request('to_date') }} @endif

@if (!$chats->count())
{{ __("messages.There are no data") }} :(
@else
@php $i = 1; $skipCount = $chats->perPage() * $chats->currentPage() - $chats->perPage(); @endphp @foreach ($chats as $chat) @php $i++ @endphp @endforeach
# {{ __('messages.Customer') }} {{ __('messages.Advisor') }} {{ __('messages.Date') }} {{ __('messages.Actions') }}
{{ $skipCount + $i }} {{ $chat->customer->name }} @if ($chat->vendor) {{ $chat->vendor->name }} @else {{ __("messages.No response from any vendor") }} @endif {{ date('Y / m / d', strtotime($chat->created_at)) }}
{{ $chats->appends(Request::except(['_token']))->links()}}
@endif
@include('admin.inc.modal-action') @endsection @section('script') @endsection