@extends('reseller.layouts.app') @section('title', 'কাস্টমার লিস্ট') @push('styles') @endpush @section('content')
কাস্টমার লিস্ট
মোট কাস্টমার: {{ $customers->total() }} জন
@if(request('search')) @endif
@forelse($customers as $customer)
@if($customer->image && file_exists(public_path($customer->image))) {{ $customer->name }} @else {{ strtoupper(substr($customer->name ?? 'C', 0, 1)) }} @endif
{{ $customer->name ?? 'N/A' }}

{{ $customer->phone ?? 'N/A' }} @if($customer->email) {{ $customer->email }} @endif

@if($customer->last_order_date) শেষ অর্ডার: {{ \Carbon\Carbon::parse($customer->last_order_date)->format('d M, Y') }} @endif
মোট অর্ডার
{{ $customer->total_orders ?? 0 }} টি
মোট খরচ
৳{{ number_format($customer->total_spent ?? 0, 0) }}
আপনার লাভ
৳{{ number_format($customer->total_profit ?? 0, 0) }}
লাভ: ৳{{ number_format($customer->total_profit ?? 0, 0) }}
@if($customer->address || $customer->district || $customer->area)
{{ $customer->address ?? '' }} @if($customer->district) , {{ $customer->district }} @endif @if($customer->area) , {{ $customer->area }} @endif
@endif
@empty
কোন কাস্টমার পাওয়া যায়নি

@if(request('search')) "{{ request('search') }}" এর জন্য কোন ফলাফল পাওয়া যায়নি। @else আপনার এখনও কোন কাস্টমার নেই। অর্ডার প্লেস করার পর কাস্টমার লিস্ট এখানে দেখাবে। @endif

@if(request('search')) সব কাস্টমার দেখুন @else নতুন অর্ডার করুন @endif
@endforelse
@if($customers->hasPages())
{{-- Previous Button --}} @if ($customers->onFirstPage()) @else @endif {{-- Page Numbers --}} @foreach(range(1, $customers->lastPage()) as $i) @if($i >= $customers->currentPage() - 2 && $i <= $customers->currentPage() + 2) @if ($i == $customers->currentPage()) {{ $i }} @else {{ $i }} @endif @endif @endforeach {{-- Next Button --}} @if ($customers->hasMorePages()) @else @endif
@endif @endsection @push('scripts') @endpush