<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    
<p><strong>Male Voters: </strong> <?php echo e($maleCount); ?>  <strong>Female Voters: </strong> <?php echo e($femaleCount); ?>  <strong>Total Entries of this user: </strong> <?php echo e($maleCount + $femaleCount); ?> </p>

<div class="container-fluid">
<table id="voterTable" class="table table-bordered" >
    <thead>
        <tr>
            <th>#</th>
            <th>Silsila Number</th>
            <th>Gharana Number</th>
            <th>Name</th>
            <th>Father's Name</th>
            <th>CNIC</th>
            <th>Age</th>
            <th>Block Code</th>
            <th>Ward No</th>
            <th>Address</th>
                                <th>Gender</th>
            <th>Actions</th>
            
        </tr>
    </thead>
    <tbody>
        <?php $__currentLoopData = $voters; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $voter): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
                <td><?php echo e($loop->iteration); ?></td>
                <td><?php echo e($voter->silsila_number); ?></td>
                <td><?php echo e($voter->gharana_number); ?></td>
                <td><?php echo e($voter->name); ?></td>
                <td><?php echo e($voter->father_name); ?></td>
                <td><?php echo e((strpos($voter->cnic, '-') !== false || strpos($voter->cnic, '–') !== false) ? str_replace(['-', '–'], '', $voter->cnic) : $voter->cnic); ?></td>
                <td><?php echo e($voter->age); ?></td>
                <td><?php echo e($voter->block_code); ?></td>
                <td><?php echo e($voter->ward_no); ?></td>
                <td><?php echo e($voter->address); ?></td>
                <td><?php echo e($voter->gender); ?></td>
                <td>
                                <!-- Edit Button -->
                                <a href="<?php echo e(route('admin.editVoter', $voter->id)); ?>" class="btn btn-warning btn-sm">Edit</a>
                                <a href="<?php echo e(route('admin.showVoter', $voter->id)); ?>" class="btn btn-info btn-sm">View</a>
                                <!-- Delete Button -->
                                <form action="<?php echo e(route('admin.deleteVoter', $voter->id)); ?>" method="POST" style="display:inline;">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('DELETE'); ?>
                                    <button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want to delete this record?')">Delete</button>
                                </form>
                            </td>
            </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </tbody>
</table>
</div><?php /**PATH /home/u217315747/domains/kaganenterprise.com/public_html/election/resources/views/admin/user_voters.blade.php ENDPATH**/ ?>