
<?php $__env->startSection('custom-styles'); ?>
<!-- DataTables CSS -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">




@endsetion
<?php $__env->startSection('content'); ?>
    <div class="row clearfix">
        <div class="col-lg-12">
            <div class="card">
                <div class="header">
                    <h2><strong>All</strong> Coupons </h2>
                    <ul class="header-dropdown">
                        <li class="dropdown">
                            <a href="<?php echo e(route('coupons.create')); ?>" class="btn btn-primary btn-sm float-right">Add
                                Coupon</a>
                        </li>
                    </ul>
                </div>
                <div class="mt-2">
                    <?php echo $__env->make('admin.layouts.partials.messages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                </div>
                <div class="body">
                    <div class="table-responsive">
                        <table class="table table-bordered table-striped table-hover js-basic-example dataTable">
                            <thead>
                                <tr>
                                    <th>Image</th>
                                    <th>Title</th>
                                    <th>Code</th>
                                    <th>Store</th>
                                    <th>Url</th>
                                    <th>Actions</th>
                                </tr>
                            </thead>
                            <tfoot>
                                <tr>
                                    <th>Image</th>
                                    <th>Title</th>
                                    <th>Code</th>
                                    <th>Store</th>
                                    <th>Url</th>
                                    <th>Actions</th>
                                </tr>
                            </tfoot>
                            <tbody>
                                <?php $__currentLoopData = $coupons; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $coupon): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><img src="<?php echo e(asset('admin-assets/images/stores')); ?>/<?php echo e($coupon->store->feature_image); ?>"
                                                alt="" width="40"></td>
                                        <td><?php echo e($coupon->title); ?></td>
                                        <td><?php echo e($coupon->code); ?></td>
                                        <td><?php echo e($coupon->store->name); ?></td>
                                        <td><a href="<?php echo e($coupon->url); ?>"><i class="zmdi zmdi-link"></i></a></td>
                                        <td>
                                            <a class="btn btn-primary btn-sm"
                                                href="<?php echo e(route('coupons.edit', $coupon->id)); ?>">Edit</a>

                                            <?php echo Form::open(['method' => 'DELETE', 'route' => ['coupons.destroy', $coupon->id], 'style' => 'display:inline']); ?>

                                            <?php echo Form::submit('Delete', ['class' => 'btn btn-danger btn-sm']); ?>

                                            <?php echo Form::close(); ?>

                                        </td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                        
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('custom-scripts'); ?>
   <!-- DataTables JS -->
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
<script>
$(document).ready(function() {
    $('.js-basic-example').DataTable({
        "paging": true,          // enable pagination
        "searching": true,       // enable search box
        "ordering": true,        // enable column sorting
        "info": true,            // show "Showing x of y entries"
        "autoWidth": false,      // prevent automatic column width adjustment
        "lengthMenu": [5, 10, 25, 50], // dropdown for number of rows
        "pageLength": 10          // default rows per page
    });
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/mdwdigizhb/blogzcenter.com/resources/views/admin/pages/coupons/index.blade.php ENDPATH**/ ?>