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

<h3>Product List</h3>
<hr>

<table class="table table-striped table-bordered dataTable" cellspacing="0" width="100%">
  <thead>
    <tr>
      <th>Name</th>
      <th class="center">Category</th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <?php foreach($products as $product): ?>
    <tr>
      <td><?php echo $product->name; ?></td>
      <td><?php echo $product->category->name; ?></td>
      <td>
        <center>
          <div class="btn-group center">
            <a href="/member/sell/product-update/<?php echo $product->id; ?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="/member/sell/product-delete/<?php echo $product->id; ?>" onclick="return confirm('Product will be remove.')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
          </div>
        </center>
      </td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('/member/template', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>