

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

<div class="card">

    <div class="card-header">
        <h4>Master Mata Pelajaran</h4>
    </div>

    <div class="card-body">

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

            </div>
        <?php endif; ?>

        <form action="<?php echo e(route('mata-pelajaran.store')); ?>"
              method="POST">

            <?php echo csrf_field(); ?>

            <div class="row">

                <div class="col-md-4">

                    <input
                        type="text"
                        name="kode_mapel"
                        class="form-control"
                        placeholder="Kode Mapel">

                </div>

                <div class="col-md-4">

                    <input
                        type="text"
                        name="nama_mapel"
                        class="form-control"
                        placeholder="Nama Mata Pelajaran">

                </div>

                <div class="col-md-4">

                    <button
                        class="btn btn-success">

                        Simpan

                    </button>

                </div>

            </div>

        </form>

        <hr>

        <table class="table table-bordered table-hover datatable">
            <thead>
                <tr>
                    <th>Kode</th>
                    <th>Nama Mapel</th>
                    <th width="180">Aksi</th>
                </tr>
            </thead>
            <tbody>
                <?php $__currentLoopData = $mapel; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $m): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($m->kode_mapel); ?></td>
                    <td><?php echo e($m->nama_mapel); ?></td>
                    <td>
                        <a href="/mata-pelajaran/<?php echo e($m->id); ?>/edit" class="btn btn-warning btn-sm">Edit</a>
                        <form action="/mata-pelajaran/<?php echo e($m->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('Hapus data?')">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', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\sistem-gaji-sekolah\resources\views/mata-pelajaran/index.blade.php ENDPATH**/ ?>