<?php $__env->startSection('content'); ?>
<main>
                    <div class="container-fluid px-4">
                        <h1 class="mt-4">Dashboard</h1>
                        <ol class="breadcrumb mb-4">
                            <li class="breadcrumb-item active">Dashboard</li>
                        </ol>
                         <div class="row">
                            <div class="col-xl-4">
                                <div class="card bg-primary text-white mb-4">
                                    <div class="card-body d-flex align-items-center justify-content-between">
                                        <div class="text-center">
                                            <div class="h5">Sponsor Count</div>
                                            <div class="h2"><?php echo e($sponsorCount); ?></div>
                                            <div class="card-footer d-flex align-items-center justify-content-between">
                                        <a class="small text-white stretched-link"  href="<?php echo e(route('sponsor.list')); ?>">View Details</a>
                                        <div class="small text-white"><i class="fas fa-angle-right"></i></div>
                                    </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xl-4">
                                <div class="card bg-warning text-white mb-4">
                                    <div class="card-body d-flex align-items-center justify-content-between">
                                        <div class="text-center">
                                            <div class="h5">Student Count</div>
                                            <div class="h2"><?php echo e($studentCount); ?></div>
                                            <div class="card-footer d-flex align-items-center justify-content-between">
                                        <a class="small text-white stretched-link"  href="<?php echo e(route('student.list')); ?>">View Details</a>
                                        <div class="small text-white"><i class="fas fa-angle-right"></i></div>
                                    </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xl-4">
                                <div class="card bg-success text-white mb-4">
                                    <div class="card-body d-flex align-items-center justify-content-between">
                                        <div class="text-center">
                                            <div class="h5"> student without sponser</div>
                                            <div class="h2"><?php echo e($unmatchedStudentCount); ?></div>
                                            <div class="card-footer d-flex align-items-center justify-content-between">
                                        <a class="small text-white stretched-link" href="<?php echo e(route('student.unsponserstudent')); ?>">View  Details</a>
                                        <div class="small text-white"><i class="fas fa-angle-right"></i></div>
                                    </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- <div class="row">
                            <div class="col-xl-6">
                                <div class="card mb-4">
                                    <div class="card-header">
                                        <i class="fas fa-chart-area me-1"></i>
                                        Area Chart Example
                                    </div>
                                    <div class="card-body"><canvas id="myAreaChart" width="100%" height="40"></canvas></div>
                                </div>
                            </div>
                            <div class="col-xl-6">
                                <div class="card mb-4">
                                    <div class="card-header">
                                        <i class="fas fa-chart-bar me-1"></i>
                                        Bar Chart Example
                                    </div>
                                    <div class="card-body"><canvas id="myBarChart" width="100%" height="40"></canvas></div>
                                </div>
                            </div>
                        </div> -->
                          <div class="row">
                           <div class="col-xl-12">
                            <div class="card mb-4">
                            <div class="card-header">
                                <i class="fas fa-table me-1"></i>
                                Payment Details
                            </div>
                            <div class="card-body">
                                <table id="datatablesSimple" class="table">
                                    <thead>
                                        <tr>
                                            <th>Payment ID</th>
                                            <th>Sponsor Name</th>
                                            <th>Student Name</th>
                                            <th>Method</th>
                                            <th>Amount</th>
                                            <th>Received Date</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $counter = 1 ?> 
                                        <?php $__currentLoopData = $payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr>
                                            <td><?php echo e($counter++); ?></td>
                                            <td><?php echo e($payment->sponsor->fullName); ?></td>
                                            <td>
                <?php $__currentLoopData = $payment->students; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $student): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php echo e($student->student_name); ?><br>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </td>
                                            <td><?php echo e($payment->method); ?></td>
                                            <td><?php echo e($payment->amount); ?></td>
                                            <td><?php echo e($payment->created_at->format('d/m/Y')); ?></td>

                                        </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </tbody>
                                </table>
                            </div>
                           </div>
                    </div>



                    <div class="row">
    <div class="col-xl-12">
        <div class="card mb-4">
            <div class="card-header">
                <i class="fas fa-table me-1"></i>
                Due Details
            </div>
            <div class="card-body">
                <table id="datatablesSimple" class="table">
                    <thead>
                        <tr>
                            <th>Payment ID</th>
                            <th>Sponsor Name</th>
                            <th>Student Name</th>
                            <th>Method</th>
                            <th>Amount</th>
                            <th>Balance Amount</th>
                            <th>Received Date</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $dueList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sponsor): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <!-- <?php echo e($sponsors); ?> -->
                            
                                <tr>
                                    <td><?php echo e($sponsor->id); ?></td>
                                    <td><?php echo e($sponsor->sponsor->fullName); ?></td>
                                    <td><?php echo e($payment->student->student_name); ?></td>
                                    <td><?php echo e($payment->method); ?></td>
                                    <td><?php echo e($payment->amount); ?></td>
                                    <td><?php echo e(max(0, 12000 - $payment->amount)); ?></td>
                                    <td><?php echo e($payment->created_at->format('d/m/Y')); ?></td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                       
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

                </main>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\91638\VB150\VB150\resources\views/index.blade.php ENDPATH**/ ?>