@extends('layouts.admin.app') @section('title', translate('Customer_list')) @push('css_or_js') @endpush @section('customerDetails') active @endsection @section('content')

{{ translate('messages.customer_list') }} {{ $customers->total() }}

@php $filtered = request()->hasAny(['filter', 'order_wise', 'show_limit', 'from_date']); @endphp {{ translate('Filter') }} @if ($filtered) @endif
@php $count = 0; @endphp @foreach ($customers as $key => $customer) @endforeach
{{ translate('sl') }} {{ translate('Customer Info') }} {{ translate('Joining Date') }} {{ translate('Total Delivered Order') }} {{ translate('Total Spent') }} {{ translate('AOV') }} {{ translate('Last Purchase') }} {{ translate('Active') }}/{{ translate('Inactive') }} {{ translate('Actions') }}
{{ (request()->get('show_limit') ? $count++ : $key) + $customers->firstItem() }}
{{ \App\CentralLogics\Helpers::date_format($customer->created_at) }}
{{ \App\CentralLogics\Helpers::time_format($customer->created_at) }}
{{ \App\CentralLogics\Helpers::format_currency($customer->total_order_amount > 0 && $customer->orders_count > 0 ? $customer->total_order_amount / $customer->orders_count : 0) }} {{ $customer->lastOrder ? \App\CentralLogics\Helpers::human_time_format($customer->lastOrder->created_at) : translate('messages.N/A') }}
@if (count($customers) === 0)
public
{{ translate('no_data_found') }}
@endif
{!! $customers->withQueryString()->links() !!}

{{ translate('Filter - Customer List') }}

{{ translate('Date Range') }}
@endsection @push('script_2') @endpush