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


<div class="mb-3">
  <nav class="navbar navbar-example navbar-expand-lg navbar-light bg-light">
      <div class="container-fluid" style="justify-content: start">
        <a class="btn btn-primary btn-sm" href="<?php echo e(url('admin/draw/create')); ?>"><i class='bx bx-plus'></i>&nbsp;add data</a>
        </div>
    </nav>
  </div>

    <div class="row">
        <div class="col-sm-12">
                <div class="card">
                  <div class="card-body">
                    <h4 class="card-title"><?php echo e($title); ?></h4>
                    <div class="table-responsive">
                      <table class="table" id="tabel">
                        <thead>
                          <tr>
                            <th>member</th>
                            <th>prize</th>
                            <th>voucher</th>
                            <th>type</th>
                            <th>expired_date</th>
                            <th>status</th>
                            <th>prize status</th>
                            <th>Action</th>
                          </tr>
                        </thead>
                        <tbody>
                          <?php $__currentLoopData = $row; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                          <tr>
                            <td><?php echo e($key->member); ?></td>
                            <td><?php echo e($key->prize); ?></td>
                            <td><?php echo e($key->voucher); ?></td>
                            <td><b>by <?php echo e($key->type); ?></b></td>
                            <td><?php echo e($key->expired_date); ?></td>
                            <td><?php echo Fibonanci::status($key->status); ?></td>
                            <td><?php echo Fibonanci::status($key->prize_status); ?></td>
                            <td>
                                <a href="<?php echo e(url('admin/draw/edit/'.Nfs::Encrypt($key->id))); ?>" class="btn btn-sm btn-warning">edit</a>
                                </button>
                                <a href="javascript:void(0)" onclick="hapus('<?php echo e(url('admin/draw/destroy/'.$key->id)); ?>')" class="btn btn-sm btn-danger">delete</a>
                            </td>
                          </tr>

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


    <!-- Modal -->

<?php $__env->startPush('js'); ?>
    <script>
      $(document).ready( function () {
        $('#tabel').DataTable({
          "pageLength": 25,
             searching: true,
             ordering:  true,
             paging: true,   
             "order": [[1, 'desc']],
             "columnDefs": [
                { "type": "date", "targets": [1] }//date column formatted like "03/23/2018 10:25:13 AM".
              ],     
        });
    });
    </script>
<?php $__env->stopPush(); ?>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('template.content', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\SPIN\SPIN-WHEEL-LARAVEL9\resources\views/admin/management/draw/index.blade.php ENDPATH**/ ?>