         <?php
            $user = Auth::user();
            $user_id = Auth::user()->id;
            $user_name = Auth::user()->name;
            $permission= $user->permission;
            $user_p= $permission->where('user_id', $user_id)
            
          ?>
          
         

<div class="sidebar">
      <div class="sidebar-header">
        <a href="../" class="sidebar-logo">TMS <span class="text-primary">Admin</span></a>
      </div><!-- sidebar-header -->
      <div id="sidebarMenu" class="sidebar-body">
        <div class="nav-group show">
            <br>
          <a href="#" class="nav-labe"></a>
          <ul class="nav nav-sidebar">
            <li class="nav-item">
              <a href="/" class="nav-link active"><i class="ri-pie-chart-2-fill"></i> <span>Dashboard</span></a>
            </li>
            
          </ul>
        </div><!-- nav-group -->
        <div style="    border-bottom: 0px;" class="nav-group show">
         <br>
          <a href="#" class="nav-labe"></a>
        <ul class="nav nav-sidebar">
         
        

         


          <!--<li class="nav-item">-->
          <!--  <a href="#" class="nav-link has-sub"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-package"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"/><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>-->
          <!--  &nbsp;&nbsp;<span>Master</span></a>-->
          <!--  <nav class="nav nav-sub">-->
          <!--    <a href="/brand" class="nav-sub-link">Brand</a>-->
          <!--  </nav>-->
          <!--</li>-->
          

          <?php if($user_p[0]['inventory'] === 1): ?>
          <li class="nav-item">
            <a href="/inventory" class="nav-link has-sub"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
            &nbsp;&nbsp;<span>Inventory</span></a>
            <nav class="nav nav-sub">
              <a href="/inventory/tyre" class="nav-sub-link">Tyre Inventory</a>
              <a href="/inventory/rim" class="nav-sub-link">Rim Inventory</a>
              <a href="/inventory/battery" class="nav-sub-link">Battery Inventory</a>
            </nav>
          </li>
          <?php endif; ?>
          
          <?php if($user_p[0]['vehicle'] === 1): ?>
          <li class="nav-item">
            <a href="/vehicle" class="nav-link"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
            &nbsp;&nbsp;<span>Vehicle</span></a>
            <nav class="nav nav-sub">
              <a href="/" class="nav-sub-link">Vehicle</a>
            </nav>
          </li>
          <?php endif; ?>
          
          <?php if($user_p[0]['trailer'] === 1): ?>
           <li class="nav-item">
            <a href="/trailer" class="nav-link"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
            &nbsp;&nbsp;<span>Trailer</span></a>
            <nav class="nav nav-sub">
              <a href="/" class="nav-sub-link">Vehicle</a>
            </nav>
          </li>
          <?php endif; ?>
          
          <?php if($user_p[0]['tyre'] === 1): ?>

          <li class="nav-item">
            <a href="/tyre" class="nav-link"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-package"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"/><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>
            &nbsp;&nbsp;<span>Tyre</span></a>
            <nav class="nav nav-sub">
              <a href="/" class="nav-sub-link">Tyre</a>
            </nav>
          </li>
          <?php endif; ?>
          
          <?php if($user_p[0]['rim'] === 1): ?>
          <li class="nav-item">
            <a href="/rims" class="nav-link"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
            &nbsp;&nbsp;<span>Rim</span></a>
            <nav class="nav nav-sub">
              <a href="/rims" class="nav-sub-link">Rim</a>
            </nav>
          </li>
          <?php endif; ?>
          
          <?php if($user_p[0]['battery'] === 1): ?>
          <li class="nav-item">
            <a href="/battery" class="nav-link"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-book"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/></svg>
            &nbsp;&nbsp;<span>Battery</span></a>
            <nav class="nav nav-sub">
              <a href="/" class="nav-sub-link">Battery</a>
            </nav>
          </li>
          <?php endif; ?>
          
          
         <?php if($user_p[0]['master'] === 1): ?>
          
        <div class="nav-group show mb-3">
          <a href="#" class="nav-label">Masters</a>
          <ul class="nav nav-sidebar" style="">
          
          <li class="nav-item">
            <a href="#" class="nav-link has-sub"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-package"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"/><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>
            &nbsp;&nbsp;<span>Vehicle Master</span></a>
            <nav class="nav nav-sub">
              <a href="/vehicle_brand" class="nav-sub-link">Brand </a>
              <a href="/vehicle_type" class="nav-sub-link">Vehicle Type</a>
              <a href="/document_type" class="nav-sub-link">Document Type</a>
            </nav>
          </li>

          <li class="nav-item">
            <a href="#" class="nav-link has-sub"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-package"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"/><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>
            &nbsp;&nbsp;<span>Trailer Master</span></a>
            <nav class="nav nav-sub">
              <a href="/trailer_brand" class="nav-sub-link">Brand </a>
              <a href="/trailer_type" class="nav-sub-link">Trailer Type</a>
            </nav>
          </li>
 
          
          <li class="nav-item">
            <a href="#" class="nav-link has-sub"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-package"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"/><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>
            &nbsp;&nbsp;<span>Tyre Master</span></a>
            <nav class="nav nav-sub">
              <a href="/tyre_brand" class="nav-sub-link">Brand</a>
              <a href="/service_type" class="nav-sub-link">Service Type</a>
              <a href="/action_type" class="nav-sub-link">Action Type</a>
              <a href="/inspection_faq" class="nav-sub-link">Inspection FAQ</a>
            </nav>
          </li>
          
          <li class="nav-item">
            <a href="#" class="nav-link has-sub"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-package"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"/><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>
            &nbsp;&nbsp;<span>Rim Master</span></a>
            <nav class="nav nav-sub">
              <a href="/rim_brand" class="nav-sub-link">Brand</a>
            </nav>
          </li>

          <li class="nav-item">
            <a href="#" class="nav-link has-sub"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-package"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"/><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>
            &nbsp;&nbsp;<span>Battery Master</span></a>
            <nav class="nav nav-sub">
              <a href="/battery_brand" class="nav-sub-link">Brand</a>
              <a href="/battery_type" class="nav-sub-link">Battery Type</a>
            </nav>
          </li>

          </ul>
        </div>
        
        <?php endif; ?>
        
        

          <?php if($user_p[0]['user_management'] === 2): ?>
          <li class="nav-item">
            <a href="edit" class="nav-link has-sub"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-airplay link-icon"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>
            &nbsp;&nbsp;<span>User Management</span></a>
            <nav class="nav nav-sub">
              <a href="/users" class="nav-sub-link">Manage Users</a>
            </nav>
          </li>
         <?php endif; ?>
          
          
          <br>
          <br>
          <br>
         

        


         
          <!-- <li class="nav-item">
            <a href="../apps/calendar.html" class="nav-link"><i class="ri-calendar-line"></i> <span>Calendar</span></a>
          </li>
          <li class="nav-item">
            <a href="../apps/chat.html" class="nav-link"><i class="ri-question-answer-line"></i> <span>Chat</span></a>
          </li>
          <li class="nav-item">
            <a href="../apps/contact.html" class="nav-link"><i class="ri-contacts-book-line"></i> <span>Contacts</span></a>
          </li>
          <li class="nav-item">
            <a href="../apps/tasks.html" class="nav-link"><i class="ri-checkbox-multiple-line"></i> <span>Task Manager</span></a>
          </li>
          <li class="nav-item">
            <a href="" class="nav-link has-sub"><i class="ri-gallery-line"></i> <span>Media Gallery</span></a>
            <nav class="nav nav-sub">
              <a href="../apps/gallery-music.html" class="nav-sub-link">Music Stream</a>
              <a href="../apps/gallery-video.html" class="nav-sub-link">Video Stream</a>
            </nav>
          </li> -->
        </ul>
      </div><!-- nav-group -->
      </div><!-- sidebar-body -->
      
    </div><!-- sidebar -->

    <div class="header-main px-3 px-lg-4">
      <a id="menuSidebar" href="#" class="menu-link me-3 me-lg-4"><i class="ri-menu-2-fill"></i></a>

      <div class="form-search me-auto">
        <input type="text" class="form-control" placeholder="Search">
        <i class="ri-search-line"></i>
      </div><!-- form-search -->

      <div class="dropdown dropdown-skin">
        <a href="" class="dropdown-link" data-bs-toggle="dropdown" data-bs-auto-close="outside"><i class="ri-settings-3-line"></i></a>
        <div class="dropdown-menu dropdown-menu-end mt-10-f">
          <label>Skin Mode</label>
          <nav id="skinMode" class="nav nav-skin">
            <a href="" class="nav-link active">Light</a>
            <a href="" class="nav-link">Dark</a>
          </nav>
          <hr>
          <label>Sidebar Skin</label>
          <nav id="sidebarSkin" class="nav nav-skin">
            <a href="" class="nav-link active">Default</a>
            <a href="" class="nav-link">Prime</a>
            <a href="" class="nav-link">Dark</a>
          </nav>
          <hr>
          <label>Direction</label>
          <nav id="layoutDirection" class="nav nav-skin">
            <a href="" class="nav-link active">LTR</a>
            <a href="" class="nav-link">RTL</a>
          </nav>
        </div><!-- dropdown-menu -->
      </div><!-- dropdown -->

      
      <div class="dropdown dropdown-profile ms-3 ms-xl-4">
          <a href="" class="dropdown-link" data-bs-toggle="dropdown" data-bs-auto-close="outside"><div class="avatar online"><img src="<?php echo e(asset('/assets/img/user.png')); ?>" alt=""></div></a>
          <div class="dropdown-menu dropdown-menu-end mt-10-f">
            <div class="dropdown-menu-body">
              <div class="avatar avatar-xl online mb-3">
                  <img src="<?php echo e(asset('/assets/img/user.png')); ?>" alt=""></div>
              <h5 class="mb-1 text-dark fw-semibold"><?php echo e($user_name); ?></h5>
              <p class="fs-sm text-secondary">Admin</p>

              <!--<nav class="nav">-->
              <!--  <a href=""><i class="ri-edit-2-line"></i> Edit Profile</a>-->
              <!--  <a href=""><i class="ri-profile-line"></i> View Profile</a>-->
              <!--</nav>-->
              <hr>
              <nav class="nav">
                <!--<a href=""><i class="ri-question-line"></i> Help Center</a>-->
                <!--<a href=""><i class="ri-lock-line"></i> Privacy Settings</a>-->
                <!--<a href=""><i class="ri-user-settings-line"></i> Account Settings</a>-->
                <a href="<?php echo e(route('Logout')); ?>"  onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
                <i class="ri-logout-box-r-line"></i>
                <span>Log Out</span>
                <form id="logout-form" action="<?php echo e(route('Logout')); ?>" method="POST" style="display: none;">
                  <?php echo csrf_field(); ?>
                </form>
              </a>
              </nav>
            </div><!-- dropdown-menu-body -->
          </div><!-- dropdown-menu -->
      </div><!-- dropdown -->
    </div><!-- header-main --><?php /**PATH /home/vokks/public_html/tms1/resources/views/layout/sidebar.blade.php ENDPATH**/ ?>