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

    <div class="card">
        <div class="d-sm-flex align-items-center justify-content-between">
        <h5 class=" mb-0 text-gray-800 pl-3"><?php echo e(__('Referral Program')); ?></h5>
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="<?php echo e(route('instructor-dashboard')); ?>"><?php echo e(__('Dashboard')); ?></a></li>
        <li class="breadcrumb-item"><a href="<?php echo e(route('instructor-affilate-index')); ?>"><?php echo e(__('Referral Program')); ?></a></li>
        </ol>
        </div>
    </div>


    <!-- Row -->
    <div class="row mt-3">
      <!-- Datatables -->
      <div class="col-lg-12">

        <?php echo $__env->make('includes.admin.form-success', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        <div class="card mb-4">

            <?php if($refer != null): ?>
                <p class="m-4">
                    <b><?php echo e(__('Current Discount')); ?>:</b> <?php echo e($refer->discount); ?>%
                </p>
            <?php endif; ?>

          <div class="table-responsive p-3">
            <table class="table align-items-center table-flush" id="geniustable">
              <thead class="thead-light">
                <tr>
                    <th><?php echo e(__('Title')); ?></th>
                    <th><?php echo e(__('Referral Count')); ?>(#)</th>
                    <th><?php echo e(__('Discount')); ?>(%)</th>
                </tr>
              </thead>
              <tbody>
                <?php $__currentLoopData = $refers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ref): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr class="conv">
                  <td><?php echo e($ref->title); ?></td>
                  <td><?php echo e($ref->times); ?></td>
                  <td><?php echo e($ref->discount); ?></td>
                </tr>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
            </table>
          </div>
        </div>
      </div>
      <!-- DataTable with Hover -->

    </div>
    <!--Row-->


<?php $__env->stopSection(); ?>


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

<script type="text/javascript">

$('#geniustable').DataTable({
			   ordering: false,
});

$(function() {
    $(".btn-area").append('<div class="col-sm-12 col-md-4 text-right">'+
        '<a class="btn btn-primary"  href="<?php echo e(route('instructor-affilate-history')); ?>"><?php echo e(__("Referral History")); ?></a>'+
    '</div>');
});
</script>


<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.instructor', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/royaldem/public_html/project/resources/views/instructor/affilate/index.blade.php ENDPATH**/ ?>