@php $manifest = json_decode(file_get_contents(public_path('build/manifest.json')), true); @endphp
{{-- --}} Plătii - {{ $heading }}
Data exportului {{ date('d-m-Y') }}
@php $payments = collect($payments) @endphp @foreach ($payments[0] as $key => $head) @endforeach @php $loopCount = 0; @endphp @foreach ($payments as $key => $paymentRow) @foreach ($paymentRow as $cellKey => $cell) @if (!is_object($cell) && !is_array($cell)) @else @endif @endforeach @php $loopCount++ @endphp @endforeach @php $i = 1; $keys =collect($payments->first())->keys(); $keysCount = (int) count($keys); @endphp @foreach($keys as $key) @if ($i == ($keysCount - 2)) @elseif($i == ($keysCount - 1)) @else @endif @php $i++; @endphp @endforeach
{{ ucfirst($key) }}
{{ $cell }} ...
{{ 'TOTAL RON' }} {{ $payments->sum('suma_in_lei') }}