<div class="kt-portlet__body">
  <table class="table table-striped- table-bordered table-hover table-checkable" id="category-view-table">
      <thead>
        <tr>
          <!--<th>#</th>-->
          <th>Name (No. of Budgets)</th>
          <th>Action</th>
        </tr>
      </thead>
      <tbody>
        <?php if(count($categories)>0): ?>
        <?php foreach($categories as $row): ?>
        <tr>
          <!--<th scope="row"><?php echo e($row->id); ?></th>-->
          <td><?php echo e($row->name); ?> <?php if($row->budgets==NULL){ echo "(0)"; } else {?>(<?php echo e($row->budgets); ?>)<?php } ?></td>
        <td ><a class="kt-badge kt-badge--lg kt-badge--warning" href="<?php echo e(url('budgets/categories/update',$row->id)); ?>" ><i class="la la-edit" id="btn"  ></i></a>	&nbsp; &nbsp;   <a class="kt-badge kt-badge--lg kt-badge--danger" href="<?php echo e(url('budgets/categories/delete/'.$row->id)); ?>" onclick="category_delete(event)"><i class="la la-trash"></i></a></td>
        </tr>
        <?php endforeach; ?>
        <?php endif; ?>

      </tbody>
    </table>
  </div>

 
 
