title: Using laravel-menu, how do I get sub-items to nest?
body: <p>I am using <a href="https://github.com/lavary/laravel-menu#sub-items" rel="nofollow">Lavary's laravel-menu package</a>, and I am trying to build a simple 2 level menu system based on the contents of a db table. I have the middleware created to create the menu on each request:</p>
  
  <pre><code>public function handle($request, Closure $next)
  {
      Menu::make('NavBar', function($menu){
          $menuitems = MenuItem::all();
          foreach($menuitems as $menuitem)
          {
              if(!is_null($menuitem-&gt;parent)){
                 // For example, 'Conferences', a top level menu item with a null parent field
                 $menu-&gt;add($menuitem-&gt;title, url($menuitem-&gt;url));
              }
              else{
                  // Parent is a field in database, for example 'Traverse City 2015' would have the parent 'conferences'
                  $parent = $menuitem-&gt;parent;
                  $menu-&gt;item($parent)-&gt;add($menuitem-&gt;title, url($menuitem-&gt;url));
  
              }
          }
      });
      return $next($request);
  }
  </code></pre>
  
  <p>In my view, I call:</p>
  
  <pre><code>{!! $NavBar-&gt;asUl() !!}
  </code></pre>
  
  <p>I would expect this to render as such:</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a href="/conferences"&gt;Conferences&lt;/a&gt;&lt;/li&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;a href="/conferences/traverse-city-2015"&gt;Traverse City 2015&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Instead, it is rendering:</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a href="/conferences/"&gt;Conferences&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/conferences/traverse-city-2015"&gt;Traverse City 2015&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Any ideas why the sub-items aren't showing up correctly?</p>