@php ini_set('memory_limit', '44M'); @endphp

Report

@if(isset($accounts)) {{-- @foreach($transactions as $data) --}} {{--

{{$accountName[$loop->index]}}

--}} @php $count = 0; @endphp @if(count($accounts) >0) @php $total = 0; @endphp @foreach($accounts as $row) @php $amount = App\Models\Payment::where('account_id', $row->id) ->whereBetween('timestamp', [$fromDate, $toDate]) ->sum('amount'); $total += $amount; @endphp @endforeach
# Name Account Type Amount
{{++$count}} {{$row->name}} {{$row->account_type}} {{$amount}}
Total: {{$total}}
@endif {{-- @endforeach --}} @endif