<?php $__env->startSection('adminPage'); ?>
    <div class="pagetitle">
        <div class="row">
            <h1 class="col">Listes des policiers enregistrées</h1>
            <div class="col ">
                <?php if(session()->has('info')): ?>
                    <div class="alert alert-warning alert-dismissible fade show" role="alert">
                        <?php echo e(session('info')); ?>

                        <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                    </div>
                <?php elseif(session()->has('modif')): ?>
                    <div class="alert alert-success alert-dismissible fade show" role="alert">
                        <?php echo e(session('modif')); ?>

                        <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                    </div>
                <?php endif; ?>




            </div>
            <nav>
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="#">Tableau</a></li>
                </ol>
            </nav>
        </div><!-- End Page Title -->
<section class="section">
    <div class="row">
        <div class="col-lg-18">
            <div class="card">
                <div class="card-body">
                    <div class="dataTable-wrapper dataTable-loading no-footer sortable searchable fixed-columns">
                        <div class="dataTable-top">
                            <div class="dataTable-dropdown">

                                     </div>

                                </div>
                                <div class="dataTable-container">
                                    <table class="table datatable dataTable-table  table-striped">
                                        <thead>
                                            <tr>
                                                <th scope="col" data-sortable="" style="width: 13.36616%;">
                                                    <a href="#" class="dataTable-sorter">Matricule</a>
                                                </th>
                                                <th scope="col" data-sortable="" style="width: 16.0245%;">
                                                    <a href="#" class="dataTable-sorter">Nom</a>
                                                </th>
                                                <th scope="col" data-sortable="" style="width: 20.8254%;">
                                                    <a href="#" class="dataTable-sorter">Prenoms</a>
                                                </th>

                                                <th scope="col" data-sortable="" style="width: 9.2956%;">
                                                    <a href="#" class="dataTable-sorter">Taille</a>
                                                </th>
                                                <th scope="col" data-sortable="" style="width: 9.2956%;">
                                                    <a href="#" class="dataTable-sorter">Sexe</a>
                                                </th>
                                                <th scope="col" data-sortable="" style="width: 13.2956%;">
                                                    <a href="#" class="dataTable-sorter">Photo</a>
                                                </th>
                                                <th scope="col" data-sortable="dataTable-sorter" style="width: 28.2956%;">
                                                    <a href="#" class="dataTable-sorter">Actions</a>
                                                </th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php if(!empty($admins) && $admins->count()): ?>
                                            <?php $__currentLoopData = $admins; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $admin=>$val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <tr>
                                                    <td><?php echo e($val->matricule); ?></td>
                                                    <td><?php echo e($val->nom); ?></td>
                                                    <td><?php echo e($val->prenoms); ?></td>
                                                    <td><?php echo e($val->taille); ?></td>
                                                    <td><?php echo e($val->sexe); ?></td>
                                                    <td><img alt="img" src="/img/<?php echo e($val->photo); ?>" width="100px"></td>
                                                    <td class="row">
                                                        <div class="col-3">
                                                            <button class="btn bg-primary">
                                                                <a href="<?php echo e(route('admin.show', $val->id)); ?>">
                                                                    <img class="pointer" src="<?php echo e(asset('assets/img/detail.png')); ?>"
                                                                        alt="" srcset="">
                                                                </a>
                                                            </button>
                                                        </div>
                                                        <div class="col-3">
                                                            <button class="btn bg-warning">
                                                                <a href="<?php echo e(route('admin.edit', $val->id)); ?>">
                                                                    <img class="pointer" src="<?php echo e(asset('assets/img/refresh.png')); ?>"
                                                                        alt="" srcset="">
                                                                </a>
                                                            </button>
                                                        </div>
                                                        <div class="col-3">
                                                            <form action="<?php echo e(route('admin.destroy', $val->id)); ?>" method="post">
                                                                <?php echo csrf_field(); ?>
                                                                <?php echo method_field('DELETE'); ?>
                                                                <button class="btn bg-danger" type="submit" >
                                                                <img src="<?php echo e(asset('assets/img/delete.png')); ?>" alt="" srcset="">

                                                                </button>
                                                            </form>
                                                        </div>

                                                    </td>


                                                </tr>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            <?php else: ?>
                                             <tr></tr>
                                             <?php endif; ?>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="dataTable-bottom">
                                    <div class="dataTable-info">
                                        <?php echo e($admins->links()); ?>

                                </div>
                                    <nav class="dataTable-pagination">
                                        <div class="dataTable-pagination-list">

                                            </div>
                                        </nav>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
<!--- --->

<style>
    .card-footer {
        justify-content: center;
        align-items: center;
        padding: 0.4em;
    }
</style>
    <?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.header-Admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/damala/Documents/police/resources/views/admin/adminPage.blade.php ENDPATH**/ ?>