@php $totalSalary = 0; @endphp @foreach ($employeePayments as $item) @php $totalSalary += $item->amount; @endphp @endforeach
Employee Id Name Email Remark Salary
{{ $item->employee_id }} {{ $item->employee->name }} {{ $item->employee->email }} {{ $item->remark }} {{ $item->amount }}
Total : {{ $totalSalary }}