<div class='row justify-content-end'>
    <div class='col-md-4'>
        <form>
            <div class="input-group mb-3">
              <input type="text" name="key" class="form-control" placeholder="Cari Member" aria-label="Cari Member" aria-describedby="button-addon2" value="<?php echo e(request()->key); ?>">
              <button class="btn btn-primary" type="submit" id="button-addon2"><span class='fa fa-search'></span></button>
            </div>            
        </form>
    </div>
</div>
<div class="table-responsive">
    <table class="table table-hover myTable" id="mytable">
        <thead>
            <tr class="table-primary">
                <th class="text-center">#</th>
                <th>Nama</th>
                <th>Email</th>
                <th>Phone</th>
                <th>Tgl Lahir</th>
                <th>Total Poin</th>
                <th>Cabang</th>
                <th>Tipe Member</th>
                <th width="11%">Aksi</th>
            </tr>
        </thead>
        <tbody>
            <?php
                $no = isset($_GET['page']) ? ($_GET['page']-1) * 25 : 0;
            ?>
            <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php
                    $no++;
                ?>
                <tr>
                    <td><?php echo e($no); ?></td>
                    <td><?php echo e($item->nama); ?></td>
                    <td><?php echo e($item->email); ?></td>
                    <td><?php echo e($item->phone); ?></td>
                    <td><?php echo e($item->tgl_lahir); ?></td>
                    <td><?php echo e($item->poin); ?></td>
                    <td><?php echo e($item->cabang); ?></td>
                    <td><?php echo e($item->category); ?></td>
                        <td>
                        <div class="form-inline btn-action">
                             <a href="<?php echo e(url('voucher/create?member='.$item->id)); ?>" class="mr-2 mb-2">
                                         <button type="button" id="PopoverCustomT-1" class="btn btn-rgb-success btn-sm"
                                             data-toggle="tooltip" title="Create Voucher" data-placement="top"><span
                                                 class="fa fa-gift fa-sm"></span></button>
                             </a>              
                             <?php if(Auth::user()->level == 0): ?>
                                 <a href=<?php echo e(url('member/'.$item->id.'/edit')); ?> class="mr-2 mb-2">
                                             <button type="button" id="PopoverCustomT-1" class="btn btn-rgb-primary btn-sm"
                                         data-toggle="tooltip" title="Edit" data-placement="top"><span
                                             class="fa fa-edit fa-sm"></span></button>
                                 </a>
                                 <form action="<?php echo e(route('member.destroy', $item->id)); ?>" method="post" class="mr-2 mb-2">
                                     <?php echo e(csrf_field()); ?>

                                     <?php echo e(method_field("DELETE")); ?>

                                     <button type="submit" class="btn btn-rgb-danger btn-sm" data-toggle="tooltip"
                                         title="Hapus" data-placement="top"
                                         onclick="return confirm('Apakah anda yakin ingin menghapus ?')">
                                         <span class="fa fa-trash fa-sm"></span>
                                     </button>
                                 </form>
                             <?php endif; ?>
                     </div>                        
                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>
</div>
<?php echo e($data->links()); ?>    
<?php /**PATH /home/coffeeto/public_html/member/resources/views/customer/_table.blade.php ENDPATH**/ ?>