<div class="table-responsive">
    <div id="basic-datatables_wrapper" class="dataTables_wrapper container-fluid dt-bootstrap4">
        <?php echo $__env->make('admin.subject.subject.components.filter', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        <div class="row">
            <div class="col-sm-12">
                <table id="basic-datatables" class="display table table-striped table-hover table-sm dataTable" role="grid" aria-describedby="basic-datatables_info">
                    <thead>
                    <tr role="row">
                        <th style="width: 100px;">MMH</th>
                        <th style="width: 190px;">Tên ngành</th>
                        <th style="width: 200px;">Chuyên ngành</th>
                        <th style="width: 250px;">Môn học</th>
                        <th style="width: 10px;">STC</th>
                        <th style="width: 10px;">BH</th>
                        <th style="width: 100px;">TT</th>
                        <th style="width: 100px;">Ngày tạo</th>
                        <th style="width: 125px;">Ngày sửa</th>
                        <th style="width: 120px;">Hành động</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr role="row" class="<?php echo e($loop->odd ? 'odd' : 'even'); ?>">
                            <td style="font-size: 14px"><?php echo e($item->code); ?></td>
                            <td style="font-size: 14px"><?php echo e($item->course->name ?? "Không có dữ liệu"); ?></td>
                            <td style="font-size: 14px"><?php echo e($item->major->name); ?></td>
                            <td style="font-size: 14px" class="sorting_1"><?php echo e($item->name); ?></td>
                            <td style="font-size: 14px"><?php echo e($item->credit_num); ?></td>
                            <td style="font-size: 14px"><?php echo e($item->total_class_session); ?></td>
                            <td style="font-size: 14px"><?php echo $item->status === 0 ? '<span class="text-success">Hoạt động</span>' : '<span class="text-danger">Không hoạt động</span>'; ?></td>
                            <td style="font-size: 14px"><?php echo e($item->created_at->format('Y-m-d') ?? "Không có dữ liệu"); ?></td>
                            <td style="font-size: 14px"><?php echo e($item->updated_at->format('Y-m-d') ?? "Không có dữ liệu"); ?></td>
                            <td style="font-size: 14px">
                                <a href="<?php echo e(route('subject.edit', ['id' => $item->id])); ?>" class="btn btn-sm btn-black" title="Sửa">
                                    <i class="fa fa-edit"></i>
                                </a>
                                <form action="<?php echo e(route('subject.destroy', ['id' => $item->id])); ?>" method="POST" style="display:inline-block;" onsubmit="return confirm('Bạn có chắc chắn muốn xóa môn học này?');">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('DELETE'); ?>
                                    <button type="submit" class="btn btn-sm btn-danger" title="Xóa">
                                        <i class="fa fa-trash"></i>
                                    </button>
                                </form>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td colspan="10">
                                <div class="alert alert-warning" role="alert">
                                    Không tìm thấy dữ liệu.
                                </div>
                            </td>
                        </tr>
                    <?php endif; ?>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12 col-md-7">
                <div class="dataTables_paginate paging_simple_numbers" id="basic-datatables_paginate">
                    <ul class="pagination">
                        <?php echo e($data->links('pagination::bootstrap-4')); ?>

                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<?php /**PATH C:\Users\phama\OneDrive\Desktop\Tai_Nguyen_Hoc_Tap\DuAnPHP3\SchoolManagementSystem\resources\views/admin/subject/subject/components/table.blade.php ENDPATH**/ ?>