<nav class="navbar navbar-expand-sm bg-dark navbar-dark">

<div id="main">
    <span >&#9776;</span>
    </div>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div id="mySidenav" class="sidenav">           
        <ul class="nav1">
            <a href="/">首頁</a>
              @foreach($result as $results)
                  <li><a href="#">{{$results->path_name}}</a>
                  <ul >
                      @foreach($iresult as $iresults )
                        @if( $iresults->path_name==$results->path_name)                                        
                            <li><a href="{{$iresults->path_dir}}">{{$iresults->ipath_dir}}</a>                           
                        @endif                                                      
                        @endforeach 
                  </ul>  
                  </li>  
              @endforeach
        </ul>             
    </div>  
  </div>   

  <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="navbar-nav">
          <li class="nav-item active">
            <a class="nav-link" href="{{route('/')}}">首頁 <span class="sr-only">(current)</span></a>
          </li>
            @section('navbar_content')
            @show
      </ul>
      <ul class="nav navbar-nav ml-auto">
      @if (Auth::check())
          <li><a id="user-icon" ><span class="fa fa-user-o fa-2x"></span></a></li>       
      @else
          <li><a href="#signup" data-toggle="modal" data-target="#myModal" ><span class="fa fa-sign-in" ></span> Login</a></li>
      @endif
      </ul>
  </div>
</nav>