@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)
# |
Name |
Account Type |
Amount |
@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
{{++$count}} |
{{$row->name}} |
{{$row->account_type}} |
{{$amount}} |
@endforeach
Total: {{$total}} |
@endif
{{-- @endforeach --}}
@endif