<?php $__env->startSection('title', '| village'); ?>


<?php $__env->startSection('content'); ?>

<div class="content-wrapper">
        <div class="content-header">
                        <div class="container-fluid">
                            <div class="row mb-2">
                            <div class="col-sm-6">
                                <h1 class="m-0 text-info">GESTION DES VILLAGES</h1>
                            </div><!-- /.col -->
                            <div class="col-sm-6">
                                <ol class="breadcrumb float-sm-right">
                                <li class="breadcrumb-item"><a href="<?php echo e(route('home')); ?>" role="button" class="btn btn-success">ACCUEIL</a></li>
                                <li class="breadcrumb-item active"><a href="<?php echo e(route('village.create')); ?>" role="button" class="btn btn-success">ENREGISTRER VILLAGE</a></li>
                                </ol>
                            </div><!-- /.col -->
                            </div><!-- /.row -->
                        </div><!-- /.container-fluid -->
            </div>

    <?php if($message = Session::get('success')): ?>
        <div class="alert alert-success">
            <p><?php echo e($message); ?></p>
        </div>
    <?php endif; ?>
    <?php if($message = Session::get('error')): ?>
        <div class="alert alert-danger">
            <p><?php echo e($message); ?></p>
        </div>
    <?php endif; ?>

<div class="col-12">
    <div class="card border-danger border-0">
        <div class="card-header bg-success text-center">Ajouter</div>
            <div class="card-body">
                <table id="example1" class="table table-bordered table-responsive-md table-striped text-center">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Nom village</th>
                            <th>Nom commune</th>
                            <th>latitude</th>
                            <th>Longitude</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php $__currentLoopData = $villages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $village): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($village->id); ?></td>
                            <td><?php echo e($village->nomv); ?></td>
                            <td><?php echo e($village->commune->nomc); ?></td>
                            <td><?php echo e($village->latitudev); ?></td>
                            <td><?php echo e($village->longitudev); ?></td>
                            <td>
                                <a href="<?php echo e(route('village.edit', $village->id)); ?>" role="button" class="btn btn-info"><i class="fas fa-edit"></i></a>
                                <?php echo Form::open(['method' => 'DELETE', 'route'=>['village.destroy', $village->id], 'style'=> 'display:inline', 'onclick'=>"if(!confirm('Êtes-vous sûr de vouloir supprimer cet enregistrement ?')) { return false; }"]); ?>

                                <button class="btn btn-danger"><i class="far fa-trash-alt"></i></button>
                                <?php echo Form::close(); ?>




                            </td>

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

                    </tbody>
                </table>



            </div>

        </div>
    </div>
</div>

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

<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\enda\RFA\plateforme RFA\rfaBackend\resources\views/village/index.blade.php ENDPATH**/ ?>