

<?php $__env->startPush('css'); ?>
    <link rel="stylesheet" href="<?php echo e(asset('assets/vendors/select2/select2.min.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('assets/vendors/select2-bootstrap-theme/select2-bootstrap.min.css')); ?>">
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
    <h3 class="mb-4">Edit Student [<?php echo e($student->name); ?> #<?php echo e($student->id); ?>]</h3>

    <div class="card">
        <div class="card-body">
            <form action="<?php echo e(route('students.update', $student->id)); ?>" method="post">
                <?php echo csrf_field(); ?>
                <?php echo method_field('put'); ?>
                <div class="row">
                    <div class="col-md-6 mb-3">
                        <label class="form-label">Trainer</label>
                        <select name="trainer" class="select2 w-100">
                            <option value="">Select Option</option>
                            <?php $__currentLoopData = $trainers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tr): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($tr->user_id); ?>"
                                    <?php echo e($student->student?->trainer_id == $tr->user_id ? 'selected' : ''); ?>><?php echo e($tr->user?->name); ?>

                                </option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                    <div class="col-md-6 mb-3">
                        <label class="form-label">Teacher</label>
                        <select name="teacher" class="select2 w-100">
                            <option value="">Select Option</option>
                            <?php $__currentLoopData = $teachers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($tc->user_id); ?>"
                                    <?php echo e($student->student?->teacher_id == $tc->user_id ? 'selected' : ''); ?>><?php echo e($tc->user?->name); ?>

                                </option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                </div>
                <button type="submit" class="btn btn-primary">Save</button>
            </form>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('js'); ?>
    <script src="<?php echo e(asset('assets/vendors/select2/select2.min.js')); ?>"></script>
    <script>
        $(".select2").select2();
    </script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/theearn1/public_html/resources/views/tl/edit_student.blade.php ENDPATH**/ ?>