@extends('layout') @section('content')
Bayar Iuran
Data Bayar Iuran

@csrf
@if (session()->get('error'))

{{ session()->get('error') }}

@endif @if (session()->get('success'))

{{ session()->get('success') }}

@endif
@foreach ($anggota as $row) @php $bayar = App\Models\BayarModel::where('anggota_id', $row->id)->first(); @endphp @if ($bayar) @else @endif @endforeach
No Nama Kecamatan/Kelurahan RT/RW Tanggal Bayar Jumlah Bayar Action
{{ $loop->iteration }} {{ $row->nama }} {{ $row->kecamatan . '/' . $row->kelurahan }} {{ $row->rt . '/' . $row->rw }}{{ date('d F Y', strtotime($bayar->tgl)) }} Rp. {{ number_format($bayar->jumlah) }}Belum Bayar Belum Bayar @if ($bayar) @else @endif
Jumlah Rp. {{ number_format($result->sum('jumlah')) }}
@endsection