@if(count($navdata) > 0)




    <!-- Sidebar Menu -->
    <ul class="sidebar-menu" data-widget="tree">
        <li class="header">&nbsp;</li>

        @php ($co = '')
        @foreach($navdata as $row)

            @if ($loop->first)
                <li class="treeview">
                    <a href="#"><i class="{{ $row->object_ico_class }}"></i> <span>{{ucfirst($row->object_display_name)}}</span>
                        <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    </a>
                    <ul class="treeview-menu">
            @endif

            @if (!$loop->first && $co != $row->object_display_name)
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#"><i class="{{ $row->object_ico_class }}"></i> <span>{{ ucfirst($row->object_display_name) }}</span>
                        <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    </a>
                    <ul class="treeview-menu">
            @endif
            <li><a href="{{ route($row->route) }}">{{ucfirst($row->name)}}</a></li>

            @php ($co = $row->object_display_name)
        @endforeach

            </ul>
        </li>
    </ul>

     <!-- /.sidebar-menu -->
@endif
