<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>ระบบจัดการโรงเรียนสอนขับรถพงษ์เพชรไดร์ฟวิ่ง</title> <!-- หัวเว็บ -->
    <!-- Tell the browser to be responsive to screen width -->
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
    <link rel="icon" href="<?php echo e(asset('imgs/logo.png')); ?>">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
    <link href="https://fonts.googleapis.com/css2?family=Sarabun:wght@200&display=swap" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@300&display=swap" rel="stylesheet">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link href="https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap" rel="stylesheet">

    <?php echo $__env->yieldContent('css'); ?>

    <link rel="stylesheet" href="<?php echo e(asset('css/app.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('css/style.css')); ?>">

</head>

<body class="hold-transition">
    <div class="wrapper" id="app">
        <!-- Navbar -->
        <nav class="main-header navbar navbar-expand bg-white navbar-light">
            <!-- Left navbar links -->
            <ul class="navbar-nav mr-auto">
                <li class="nav-item">
                    <a class="nav-link" data-widget="pushmenu" href="#"><i class="fa fa-bars"></i></a>
                </li>
                <li class="nav-item ml-3 pt-1">
                    <h4><?php echo e($page_title); ?></h4>
                </li>
            </ul>
            <!-- Right navbar links -->
            <ul class="navbar-nav ml-auto mt-auto">
                <li class="nav-item dropdown mr-3">
                    <a class="nav-link" data-toggle="dropdown" href="#">
                      <span><?php echo e(auth()->user()->firstname." ".auth()->user()->lastname); ?> <i class="fas fa-angle-down"></i></span>
                    </a>
                    <div class="dropdown-menu dropdown-menu-right">
                        <form action="<?php echo e(route('user.change_password')); ?>" method="post">
                        <?php echo csrf_field(); ?>
                            <input type="hidden" name="uid" value="<?php echo e(auth()->user()->id); ?>">
                            <button class="dropdown-item button-dropdown-item" type="submit"><i class="fas fa-key mr-2"></i> เปลี่ยนรหัสผ่าน</button>
                        </form>
                        <div class="dropdown-divider"></div>
                        <a href="<?php echo e(route('user.info')); ?>" class="dropdown-item">
                            <i class="fas fa-address-card mr-2"></i> ข้อมูลส่วนตัว
                        </a>
                    </div>
                  </li>
                <li class="nav-item d-sm-inline-block">
                    <form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST">
                        <button type=submit class="btn btn-sm btn-outline-danger mt-1">
                            <span><i class="fas fa-sign-out-alt "></i> Logout</span>
                        </button>
                    <?php echo csrf_field(); ?>
                    </form>
                </li>
            </ul>
        </nav>
        <!-- /.navbar -->

        <!-- Main Sidebar Container -->
        <aside class="main-sidebar sidebar-dark-primary elevation-4">
            <!-- Brand Logo -->
            <div class="brand-link" style="border: none; background-color:#4F7957; height:3.1em;">
                <img src="<?php echo e(asset('imgs/logo.png')); ?>" alt="Logo" class="brand-image ">
                <span class="brand-text" style="font-size: 0.85em;">PongPhet Driving School</span><!-- หัวเว็บ -->
            </div>

            <!-- Sidebar -->
            <div class="sidebar">
                <!-- Sidebar Menu -->
                <nav class="mt-2">
                    <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                        data-accordion="false">
                        <li class="nav-item text-center">
                            <button type="button" class="btn btn-light btn-block" onclick="window.location.href='<?php echo e(route('student.create')); ?>';">ลงทะเบียนนักเรียนใหม่</button>
                            <hr />
                        </li>

                        <li class="nav-item has-treeview">
                            <a href="<?php echo e(route('home.index')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('home.index') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('home.showExam') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('home.showTomorrow') ? 'active' : ''); ?>

                            ">
                                <i class="fas fa-tachometer-alt mr-2"></i> หน้าแรก
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a href="<?php echo e(route('teacher_scan.index')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('teacher_scan.index') ? 'active' : ''); ?>

                            ">
                                <i class="fas fa-user-tie mr-2"></i> ครูสแกนว่าง
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a href="<?php echo e(route('calendar.index_day')); ?>" class="nav-link
                                <?php echo e(request()->routeIs('calendar.index_day') ? 'active' : ''); ?>

                                <?php echo e(request()->routeIs('calendar.submit_day') ? 'active' : ''); ?>

                                ">
                                <i class="fas fa-calendar-alt mr-2"></i> ตารางเรียน (รายวัน)
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a href="<?php echo e(route('calendar')); ?>" class="nav-link
                                <?php echo e(request()->routeIs('calendar') ? 'active' : ''); ?>

                                <?php echo e(request()->routeIs('calendar.submit') ? 'active' : ''); ?>

                                ">
                                <i class="fas fa-calendar-alt mr-2"></i> ตารางเรียน (รายสัปดาห์)
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a href="<?php echo e(route('student.index')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('student.index') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('student.create') ? 'active' : ''); ?>

                            <?php if(isset($student->id) && $student->is_active=='1'): ?>
                            <?php echo e(request()->routeIs('student.edit') ? 'active' : ''); ?>

                            <?php endif; ?>
                            <?php echo e(request()->routeIs('student.show') ? 'active' : ''); ?> ">
                                <i class="fas fa-user mr-2"></i> การจัดการนักเรียน
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a href="<?php echo e(route('course.index')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('course.index') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('course.create') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('course.edit') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('course.show') ? 'active' : ''); ?> ">
                                <i class="fas fa-book mr-2"></i> การจัดการคอร์สเรียน
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a href="<?php echo e(route('teacher.index')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('teacher.index') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('teacher.create') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('teacher.edit') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('teacher.show') ? 'active' : ''); ?> ">
                                <i class="fas fa-user-tie mr-2"></i> <p>การจัดการผู้สอน </p>
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a  href="<?php echo e(route('vehicle.index')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('vehicle.index') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('vehicle.create') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('vehicle.edit') ? 'active' : ''); ?>

                            ">
                                <i class="fas fa-car mr-2"></i> การจัดการยานพาหนะ
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a  href="<?php echo e(route('branch.index')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('branch.index') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('branch.create') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('branch.edit') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('branch.show') ? 'active' : ''); ?>

                            ">
                            <i class="fas fa-university mr-2"></i> การจัดการสาขา
                            </a>
                        </li>

                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('isSuperadmin')): ?>
                        <li class="nav-item has-treeview">
                            <a href="<?php echo e(route('payment.index')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('payment.index') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('payment.create') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('payment.edit') ? 'active' : ''); ?>

                            ">
                                <i class="fas fa-money-bill-alt mr-2"></i> การจัดการค่าจ้าง
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a href="<?php echo e(route('user.index')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('user.index') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('user.create') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('user.edit') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('user.show') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('user.admin_change_password') ? 'active' : ''); ?>

                            ">
                                <i class="fas fa-user-cog mr-2"></i> การจัดการผู้ใช้ระบบ
                            </a>
                        </li>
                        <?php endif; ?>
                        <li class="nav-item has-treeview">
                            <a href="<?php echo e(route('income.index')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('income.index') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('income.create') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('income.edit') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('income.show') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('income.submit') ? 'active' : ''); ?>

                            ">
                            <i class="fas fa-hand-holding-usd mr-2"></i> รายรับอื่นๆ
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a href="<?php echo e(route('withdraw.index')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('withdraw.index') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('withdraw.create') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('withdraw.edit') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('withdraw.show') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('withdraw.submit') ? 'active' : ''); ?>

                            ">
                            <i class="fas fa-hand-holding-usd mr-2"></i> รายการเบิกเงิน
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a  href="<?php echo e(route('finance')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('finance') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('finance.submit') ? 'active' : ''); ?>

                            ">
                                <i class="fas fa-coins mr-2"></i> การเงิน
                            </a>
                        </li>


                        

                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('isSuperadmin')): ?>
                        <li class="nav-item has-treeview">
                            <a  href="<?php echo e(route('report')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('report') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('report.submit') ? 'active' : ''); ?>

                            ">
                            <i class="fas fa-chart-bar mr-2"></i> กราฟรายงาน
                            </a>
                        </li>
                        <li><hr /></li>
                        <li class="nav-item has-treeview">
                            <a  href="<?php echo e(route('student.graduated')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('student.graduated') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('student.show_graduated') ? 'active' : ''); ?>

                            <?php if(isset($student->id) && $student->is_active=='0'): ?>
                            <?php echo e(request()->routeIs('student.edit') ? 'active' : ''); ?>

                            <?php endif; ?>
                            ">
                                <i class="fas fa-user mr-2"></i> นักเรียนที่เรียนจบแล้ว
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a  href="<?php echo e(route('log.access')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('log.access') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('log.access_post') ? 'active' : ''); ?>

                            ">
                            <i class="fas fa-clock mr-2"></i> บันทึกการเข้าระบบ
                            </a>
                        </li>
                        <li class="nav-item has-treeview">
                            <a  href="<?php echo e(route('log.event')); ?>" class="nav-link
                            <?php echo e(request()->routeIs('log.event') ? 'active' : ''); ?>

                            <?php echo e(request()->routeIs('log.event_post') ? 'active' : ''); ?>

                            ">
                            <i class="fas fa-clock mr-2"></i> บันทึกการใช้งานระบบ
                            </a>
                        </li>
                        <?php endif; ?>

                    </ul>
                </nav>
                <!-- /.sidebar-menu -->
            </div>
            <!-- /.sidebar -->
        </aside>

        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">

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

        </div>

    </div>
    <!-- ./wrapper -->

    <script src="<?php echo e(asset('js/app.js')); ?>"></script>

    <?php echo $__env->yieldContent('footerscript'); ?>

</body>

</html>
<?php /**PATH C:\laragon\www\school.pongpetrdriving.com\resources\views/layouts/web.blade.php ENDPATH**/ ?>