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

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

<?php $__env->startSection('header'); ?>
    <?php echo $__env->make('includes.admin-header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-md-6 mx-auto">
        <?php echo $__env->make('includes.errors', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <div class="card mt-4">
                <div class="card-body">
                    <h3 class="card-title text-primary">Produits</h3>
                    <hr>
                    <table class="table table-hover table-inverse table-responsive mx-auto">
                        <thead class="thead-default">
                            <tr>
                                <th>Libellé</th>
                                <th>Prix</th>
                                <th>Image</th>
                                <th>Action</th>
                            </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td scope="row"><?php echo e($product->name); ?></td>
                                    <td><?php echo e($product->prix); ?> dh</td>
                                    <td><img src="<?php echo e(URL::to('images/'.$product->file)); ?>" class="img-fluid" alt="" height="50" width="50"></td>
                                    <td><a href="<?php echo e(route('product.delete',['id'=>$product->id])); ?>" class="btn btn-danger btn-xs"><i class="fa fa-trash"></i></a> <a href="<?php echo e(route('products.edit',['id'=>$product->id])); ?>" class="btn btn-warning btn-xs"><i class="fas fa-pencil-alt"></i></a></td>
                                </tr> 
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

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

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

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

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

<?php echo $__env->make('includes.main-layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>