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

.help-block{
  color:red;
}
.is-invalid{border:1px solid red !important;}
      </style>          
<div class="col-sm-12">
                         <a href="<?php echo e(url('subcategory')); ?>" >Add Subcategory+ </a>

 <?php $__currentLoopData = ["success","error"]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if(Session::has($status)): ?>
<div class="alert alert-<?php echo e($status); ?> alert-dismissible">
  <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
  <strong><?php echo e($status); ?>!</strong> <?php echo e(Session::get($status)); ?> action.
</div>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  <?php 
$catelist=App\Subcategory::select("*")->get();
//dd($catelist);
  ?>   
 <div class="card mb-4">
<div class="card-header">
<i class="fas fa-table mr-1"></i>
     Subcategory List
</div>  
 <div class="card-body">  
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">

<thead>
<tr>
  
  <th>Sr No.</th><th>Category Name</th> <th>Subcategory Name</th> <th>Created Date</th> <th>Action</th>
</tr>

</thead>
<tbody>


<?php $i=0; ?>
<?php $__currentLoopData = $catelist; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

<tr>
  <td><?php echo e(++$i); ?></td>
  <td><?php echo e(App\Category::getcatnm($cat->cat_id)); ?></td>
  <td><?php echo e($cat->subcategorynm); ?></td>
  <td><?php echo e(date('d/m/Y',strtotime($cat->created_at))); ?></td>
  <td>
    <a href="<?php echo e(url('subcategory',['id'=>$cat->id])); ?>" class="btn btn-success btn-sm">Edit </a> 
   <a  onclick="return confirm('Are You Sure Want To Delete ?')"  href="<?php echo e(url('deletewala',['id'=>$cat->id,$cat->getTable()])); ?>" class="btn btn-danger btn-sm">Delete </a></td>

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


     <?php $__env->stopSection(); ?>
             
<?php echo $__env->make('layout/master2', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\sangya\resources\views/subcategorylist.blade.php ENDPATH**/ ?>