<div class="col-md-6">
  <div class="p-20">
    <table class="table m-0">
      <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 class="actions"><a class="on-default" href="<?php echo e(url('budgets/categories/update',$row->id)); ?>" ><i class="fa fa-pencil-square-o" id="btn"  ></i></a>	&nbsp; &nbsp;   <a class="on-default remove-row" href="<?php echo e(url('budgets/categories/delete/'.$row->id)); ?>" onclick="return confirm('Are you sure you wish to proceed?')"><i class="fa fa-trash-o"></i></a></td>
        </tr>
        <?php endforeach; ?>
        <?php endif; ?>

      </tbody>
    </table>

	  
	
  </div>
</div>

 
 
