@foreach ($customers->chunk(100) as $chunk) @foreach ($chunk as $index => $customer) @endforeach @endforeach
Detail History Transaksi Customer
# Id Customer Nama HP Total Transaksi Total Nilai Total Diskon didapat
{{ ++$index }} {{ $customer->customer_number }} {{ $customer->name }} {{ $customer->phone }} {{ $customer->transaction->count() }} {{ (new App\Services\TransactionService())->totalPriceGroupAsString($customer->fresh()->transaction) }} {{ (new App\Services\TransactionService())->totalDiscountGivenGroupAsString($customer->fresh()->transaction) }}