<nav class="navbar navbar-default navbar-static-top">
    <div class="container">
        <div class="navbar-header">
            <!-- Collapsed Hamburger -->
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#app-navbar-collapse">
                <span class="sr-only">Toggle Navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <!-- Branding Image -->
            <a class="navbar-brand" href="{{ url('/') }}">
                Laravel
            </a>
        </div>
        <div class="collapse navbar-collapse" id="app-navbar-collapse">
            <!-- Left Side Of Navbar -->
            <ul class="nav navbar-nav">
                <li class="dropdown">
                    <a id="drop1" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                            aria-haspopup="true" aria-expanded="false"> Articles
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">
                        <li>
                            <a href="/article">Search Articles</a>
                        </li>
                        <li>
                            <a href="/article/create">Create Article</a>
                        </li>
                        <li class="dropdown-submenu">
                            <a href="#">Authors</a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="/author">Search Authors</a>
                                </li>
                                <li>
                                    <a href="/author/create">Create Author</a>
                                </li>
                            </ul>
                        </li>
                        <li class="dropdown-submenu">
                            <a href="#">Magazines</a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="/magazine/edition/admin">Editions</a>
                                </li>
                                <li>
                                    <a href="/magazine/month">Months</a>
                                </li>
                            </ul>
                        </li>
                        <li class="dropdown-submenu">
                            <a href="#">Types</a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="/article/type">Search Types</a>
                                </li>
                                <li>
                                    <a href="/article/type/create">Create Type</a>
                                </li>
                            </ul>
                        </li>
                        <li class="dropdown-submenu">
                            <a href="#">Categories</a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="/article/category">Search Categories</a>
                                </li>
                                <li>
                                    <a href="/article/category/create">Create Category</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a id="drop1" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                            aria-haspopup="true" aria-expanded="false"> Newsletters
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">
                        <li>
                            <a href="/newsletter/admin">Search Newsletters</a>
                        </li>
                        <li>
                            <a href="/newsletter/create">Create Newsletter</a>
                        </li>
                        <li class="dropdown-submenu">
                            <a href="#">Banners</a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="/banner">Search Banners</a>
                                </li>
                                <li>
                                    <a href="/banner/create">Create Banners</a>
                                </li>
                                <li>
                                    <a href="/banner/reports">Banner Reports</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a id="drop1" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                            aria-haspopup="true" aria-expanded="false"> Subscribers
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">
                        <li>
                            <a href="/subscriber/admin">Search Subscribers</a>
                        </li>
                        <li>
                            <a href="/subscriber/create">Create Subscribers</a>
                        </li>
                        <li>
                            <a href="/subscriber/mailing-list">Mailing List</a>
                        </li>
                        <li>
                            <a href="/subscriber/audit">Audit</a>
                        </li>
                        <li>
                            <a href="/subscriber/daily-subscribers-report">Daily Subscriber Report</a>
                        </li>
                        <li>
                            <a href="/subscriber/changed-data-report">Changed Data Report</a>
                        </li>
                        @if (Auth::user()->role == 1)
                        <li>
                            <a href="/subscriber/export/history">Excel Download Requests</a>
                        </li>
                        @endif
                    </ul>
                </li>
                <li class="dropdown">
                    <a id="drop1" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                            aria-haspopup="true" aria-expanded="false"> Videos
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">
                        <li>
                            <a href="/video/admin">Search Videos</a>
                        </li>
                        <li>
                            <a href="/video/create">Create Videos</a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a id="drop1" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                            aria-haspopup="true" aria-expanded="false"> Events
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">
                        <li>
                            <a href="/event">Search Events</a>
                        </li>
                        <li>
                            <a href="/event/create">Create Event</a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a id="drop1" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                            aria-haspopup="true" aria-expanded="false"> Directory
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">
                        <li>
                            <a href="/directory/admin">Search Directory</a>
                        </li>
                        <li>
                            <a href="/directory/create">Create Listing</a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a id="drop1" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                            aria-haspopup="true" aria-expanded="false"> Miscellaneous
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">
                        <li>
                            <a href="/banner-resize">Resize Google DFP Banners</a>
                        </li>
                        <li>
                            <a href="/email-marketing">Email Marketing Campaigns</a>
                        </li>
                    </ul>
                </li>
            </ul>
            <!-- Right Side Of Navbar -->
            <ul class="nav navbar-nav navbar-right">
                <!-- Authentication Links -->
                @if (Auth::guest())
                    <li>
                        <a href="{{ url('/login') }}">Login</a>
                    </li>
                @else
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
                            {{ Auth::user()->name }}
                            <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu" role="menu">
                            <li>
                                <a href="{{ url('/register') }}">Register</a>
                            </li>
                            <li>
                                <a href="{{ route('logout') }}" id="logout">
                                    <i class="fa fa-btn fa-sign-out"></i>
                                    Logout
                                </a>
                                <form id="logout_form" action="/logout" method="POST" style="display: none;">
                                    {{ csrf_field() }}
                                </form>
                            </li>
                        </ul>
                    </li>
                @endif
            </ul>
        </div>
    </div>
</nav>
@push('scripts')
<script>
    $(function () {

        $('#logout').click(function (e) {

            e.preventDefault();
            $('#logout_form').submit();
        });
    });
</script>
@endpush
