<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.23/css/jquery.dataTables.css">
<!-- <link rel="stylesheet" href="https://cdn.datatables.net/1.10.23/css/dataTables.bootstrap4.min.css">  -->

<?php $__env->startSection('content'); ?>
<div class="common-content">
          <div class="page-content">
                <div class="page-heading">
                    <div class="headings">
                        <h6>Categories</h6>
                    </div>
                </div>
              
                <a href="<?php echo e(url('admin/addcategory')); ?>"><button class="btn btn-success" style="margin-top: 10px;margin-bottom: 10px;margin-left: 815px;">Add Category</button></a>
              
              <div class="hack1">
                                    <div class="hack2 hk3">
                                        <div class="tableBox wraper">
                <table id="example" class="table table-striped table-bordered" style="width:100%">
        <thead>
            <tr>
                <th>Id</th>
                <th>Category Name</th>
                <th>Created Date</th>
                <th>Action</th>
            </tr>
        </thead>
        <tbody>
        <?php $__currentLoopData = $category_lists; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
                <td><?php echo e($key+1); ?></td>
                <td><?php echo e($category->category); ?></td>
                <td><?php if(!empty($category->created_at)): ?><?php echo e(date("F j, Y",strtotime($category->created_at))); ?><?php endif; ?></td>
                <td>
                    <a href="<?php echo e(url('admin/editcategory')); ?>/<?php echo e($category->category_id); ?>"><button class="btn"><i class="fa fa-edit"></i></button></a>
                    <a href="<?php echo e(url('admin/deletecategory')); ?>/<?php echo e($category->category_id); ?>" onclick="return confirm('Are you sure?')"><button class="btn"><i class="fa fa-trash"></i></button></a>               
                    
                </td>
            </tr>
            
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>    
            
            
            
        </tbody>
        <!-- <tfoot>
            <tr>
                <th>Id</th>
                <th>Product Name</th>
                <th>Product Code</th>
                <th>Action</th>
            </tr>
        </tfoot> -->
    </table>
                                        </div>
                  </div>
              </div>

          </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<!-- <script src = "https://code.jquery.com/jquery-3.5.1.js"></script>
<script src = "https://cdn.datatables.net/1.10.23/js/jquery.dataTables.min.js"></script>
<script src = "https://cdn.datatables.net/1.10.23/js/dataTables.bootstrap4.min.js"></script> -->
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.23/js/jquery.dataTables.js"></script>
<script>

<?php if(Session::has('message')): ?>
      swal({
        title: "",
        text: "<?php echo e(Session::get('message')); ?>",
        type: "success",
        showCancelButton: false,
        dangerMode: false,
        confirmButtonText: 'OK',

    });
<?php endif; ?>


$(document).ready(function() {
 // executes when HTML-Document is loaded and DOM is ready
 $(".pageloader").show();
$(".pageloader").delay(200).fadeOut("slow");
});
$(document).ready(function() {
    $('#example').DataTable();
} );
</script>
<?php $__env->stopSection(); ?>




<?php echo $__env->make('layouts.main_admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/meddbot/public_html/resources/views/admin/categorylist.blade.php ENDPATH**/ ?>