
<?php $__env->startSection('morecss'); ?>
<style>
a.btn-color:hover {
  color: white !important;
}
a.btn-color{
	text-align: center;
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="container mt-5">
            <div class="row">
               <div class="col-lg-7 col-sm-12 col-12">
                  <div class="mendas-data">
                     <h4 class="text-center mb-5"><i class="fab fa-product-hunt"></i> Communes</h4>
					 <?php if(session()->has('message')): ?>
				<div class="alert alertToolsBar alert-info alert-dismissible fade show }} mb-5"> 
                <?php echo session('message'); ?>

                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                  </button>
                </div>
				<?php endif; ?>
                     <div class="table-responsive">
                        <table  id="example" class="table" style="width:100%">
                        <thead>
                           <tr>
						   <th><strong>Code postal</strong></th>
                               <th><strong>NOM</strong></th>
                               <th></th>
                               <th></th>
                               <th></th>
                           </tr>
                        </thead>
                        <tbody>
						<?php $__currentLoopData = $communes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $commune): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                           <tr>
						   <td><?php echo e($commune->code_postal); ?></td>
				                    <td><?php echo e($commune->nom); ?></td>
                              <td><a href="<?php echo e(route('communes.edit',$commune->id)); ?>"><i class="fas fa-edit"></i></a></td>
                              <td><form action="<?php echo e(route('communes.destroy', $commune->id)); ?>" method ="POST">
				                            <?php echo csrf_field(); ?>
											<?php echo e(method_field('DELETE')); ?>

				                            <button type="submit" class="btn-back" onclick="return confirm('Vraiment supprimer cette commune ?')"><i class="fas fa-trash"></i></button>
				                        </form></td>
                           </tr>
						   <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                     
                        </tbody>
                     </table>
					 <a href="<?php echo e(route('communes.create')); ?>" class="btn-color pull-right w-50">Créer une nouvelle commune</a>
                    <?php echo e($communes->links()); ?>

                     </div>
                  </div>
				  <p><a href="<?php echo e(route('home')); ?>" class="text-dark"><i class="fas fa-chevron-left mr-2"></i>Retour</a></p>

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

         <img src="<?php echo e(asset('image/PersonnageMecanicien.png')); ?>" class="comman-image-all3">

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

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home2/younguxc/hellodjo.younggeeks.co.in/resources/views/communes/index.blade.php ENDPATH**/ ?>