@extends('backend.layouts.app') @section('content') @include('backend.agent.search')

{{$page_title}} LIST

@forelse ($list as $key=> $data) @empty @endforelse
# Info Adress / Assign Address Wallet Balance Total Deposite Amount Total Withdrawal Amount KYC Status Action
{{($key+1) + ($list->currentPage() - 1)*$list->perPage()}} Samuh Id: {{$data->user_id}}
Name: {{$data->name}}
Phone: {{$data->phone}}
Designation: {{$data->designation?$data->designation->name:'--'}}
Added Members: {{$data->customers->count()}}
{{$data->userDetail?->village?->name}}, {{$data->userDetail?->gramPanchayat?->name}}, {{$data->userDetail?->block?->name}},
{{$data->userDetail?->district?->name}}, {{$data->userDetail?->state?->name}}, {{$data->userDetail?->country?->name}}
Assigned: @if($data->designation_id && $data->assigned_id) @if($data->designation_id==1) @foreach($data->assigned_id as $val) {{App\Models\Backend\Village::find($val)?->name}}, @endforeach @endif @if($data->designation_id==2) @foreach($data->assigned_id as $val) {{App\Models\Backend\GramPanchayat::find($val)?->name}}, @endforeach @endif @if($data->designation_id==3) @foreach($data->assigned_id as $val) {{App\Models\Backend\Block::find($val)?->name}}, @endforeach @endif @if($data->designation_id==4) @foreach($data->assigned_id as $val) {{App\Models\Backend\District::find($val)?->name}}, @endforeach @endif @if($data->designation_id==5) @foreach($data->assigned_id as $val) {{App\Models\Backend\State::find($val)?->name}}, @endforeach @endif @endif
₹ {{$data->balance}} @php $deposite_amounts = App\Models\CustomerAmountDeposite::where('staff_id',$data->id)->sum('amount'); @endphp ₹ {{$deposite_amounts}} @php $withdrawal_amounts = App\Models\CustomerAmountWithdrawal::where('staff_id',$data->id)->sum('amount'); @endphp ₹ {{$withdrawal_amounts}} @if ($data?->userDetail?->kyc_status=="not_updated") Not Updated @elseif ($data?->userDetail?->kyc_status=="pending") Pending @elseif ($data?->userDetail?->kyc_status=="approved") Approved @elseif ($data?->userDetail?->kyc_status=="disapproved") Disapproved @endif {{-- --}}

Opps!! There Are No Data Found..
{{ $list->links() }}
@endsection