@if(Auth::check())
<div class="sidebar" data-background-color="white" data-active-color="danger">
    <div class="sidebar-wrapper">

            @if(Auth::user()->role == 'admin')
            <div class="logo">
                <a href="{{route('admin')}}" class="simple-text">
                    Selamat Datang {{Auth::user()->username}}
                </a>
            </div>

            <ul class="nav">
            <li class="{{Request::segment(2) == '' ? 'active' : ''}}">
                <a href="{{route('admin')}}">
                    <i class="fa fa-home"></i>
                    <p>Dashboard</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'book' ? 'active' : ''}}">
                <a href="{{route('book.index')}}">
                    <i class="fa fa-book "></i>
                    <p>List of Book</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'upload' ? 'active' : ''}}">
                <a href="{{route('upload.index')}}">
                    <i class="fa fa-clipboard"></i>
                    <p>Share</p>
                </a>
            </li>


<div class="container">
  
  <button type="button" class="btn btn-info" data-toggle="collapse" data-target="#demo">Simple collapsible</button>
  <div id="demo" class="collapse">
    Proses Penambahan user
  </div>
</div>

            <li class="{{Request::segment(2) == 'mahasiswa' ? 'active' : ''}}">
                <a href="{{route('mahasiswa.index')}}">
                    <i class="fa fa-graduation-cap"></i>
                    <p>Tambahkan Mahasiswa</p>
                </a>
            </li>

            @elseif(Auth::user()->role == 'mahasiswa')
            <div class="logo">
                <a href="{{route('mahasiswa')}}" class="simple-text">
                    Selamat Datang {{Auth::user()->mahasiswa->nama_mahasiswa}}
                </a>
            </div>

            <ul class="nav">
            <li class="{{Request::segment(2) == '' ? 'active' : ''}}">
                <a href="{{route('mahasiswa')}}">
                    <i class="fa fa-home"></i>
                    <p>Dashboard</p>
                </a>
            </li>

             <li class="{{Request::segment(2) == 'sbook' ? 'active' : ''}}">
                <a href="{{route('sbook.index')}}">
                    <i class="fa fa-book "></i>
                    <p>List of Book</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'seeupload' ? 'active' : ''}}">
                <a href="{{route('seeupload.index')}}">
                    <i class="fa fa-list"></i>
                    <p>List of Ide</p>
                </a>
            </li>








            
            
            @endif
        </ul>
    </div>
</div>
@endif