

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

<?php if(session('success')): ?>
<div class="alert alert-success">
    <?php echo e(session('success')); ?>

</div>
<?php endif; ?>

<a href="<?php echo e(route('staff.create')); ?>"
   class="btn btn-primary mb-3">

   Tambah Staff

</a>

<table class="table table-bordered table-hover datatable">
    <thead>
        <tr>
            <th>NIP</th>
            <th>Nama</th>
            <th>Jabatan</th>
            <th>Gaji Pokok</th>
            <th width="180">Aksi</th>
        </tr>
    </thead>

    <tbody>
    <?php $__currentLoopData = $staff; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

    <tr>
        <td><?php echo e($s->nip); ?></td>
        <td><?php echo e($s->nama); ?></td>
        <td><?php echo e($s->jabatan); ?></td>
        <td><?php echo e(number_format($s->gaji_pokok)); ?></td>

        <td>

            <a href="<?php echo e(route('staff.edit',$s->id)); ?>"
               class="btn btn-warning btn-sm">

                Edit

            </a>

            <form action="<?php echo e(route('staff.destroy',$s->id)); ?>"
                  method="POST"
                  style="display:inline">

                <?php echo csrf_field(); ?>
                <?php echo method_field('DELETE'); ?>

                <button
                    class="btn btn-danger btn-sm"
                    onclick="return confirm('Yakin hapus data?')">

                    Hapus

                </button>

            </form>

        </td>

    </tr>

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

</table>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\sistem-gaji-sekolah\resources\views/staff/index.blade.php ENDPATH**/ ?>