<?php $__env->startSection('title', 'Data Izin P1'); ?>

<?php $__env->startSection('content'); ?>
<div class="card">
    <div class="card-header">
        <h3 class="card-title">Data Izin P1</h3>
        <div class="card-tools">
            <a href="<?php echo e(route('izin_p1.create')); ?>" class="btn btn-primary btn-sm">Tambah Data</a>
        </div>
    </div>
    <div class="card-body">
        <?php if(session('success')): ?>
            <div class="alert alert-success"><?php echo e(session('success')); ?></div>
        <?php endif; ?>
        <table class="table table-bordered table-striped datatable">
            <thead>
                <tr>
                    <th>No. Surat</th>
                    <th>NIM</th>
                    <th>Nama</th>
                    <th>Judul</th>
                    <th>Tanggal</th>
                    <th>Aksi</th>
                </tr>
            </thead>
            <tbody>
                <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $d): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($d->nosrt); ?></td>
                    <td><?php echo e($d->nim); ?></td>
                    <td><?php echo e($d->mahasiswa->nama ?? ''); ?></td>
                    <td><?php echo e($d->judul); ?></td>
                    <td><?php echo e($d->tanggal); ?></td>
                    <td>
                        <a href="<?php echo e(route('izin_p1.edit', $d->id)); ?>" class="btn btn-warning btn-sm">Edit</a>
                        <a href="<?php echo e(route('izin_p1.pdf', $d->id)); ?>" class="btn btn-info btn-sm" target="_blank">Cetak PDF</a>
                        <form action="<?php echo e(route('izin_p1.destroy', $d->id)); ?>" method="POST" class="d-inline" onsubmit="return confirm('Yakin hapus?');">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('DELETE'); ?>
                            <button class="btn btn-danger btn-sm">Hapus</button>
                        </form>
                    </td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
        </table>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /opt/lampp/htdocs/skripsifh/resources/views/izin_p1/index.blade.php ENDPATH**/ ?>