<nav class="navbar navbar-expand-sm navbar-dark bg-dark">
    <a class="navbar-brand" href="#">Ecommerce</a>
    <button class="navbar-toggler hidden-lg-up" type="button" data-toggle="collapse" data-target="#collapsibleNavId" aria-controls="collapsibleNavId"
        aria-expanded="false" aria-label="Toggle navigation"></button>
    <div class="collapse navbar-collapse" id="collapsibleNavId">
        <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
            <li class="nav-item active">
                <a class="nav-link" href="<?php echo e(url('/')); ?>"><i class="fa fa-home"></i> Accueil <span class="sr-only">(current)</span></a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Produits</a>
            </li>
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="dropdownId" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Compte</a>                
                <div class="dropdown-menu" aria-labelledby="dropdownId">
                <a class="dropdown-item" href="<?php echo e(route('cart.index')); ?>"><i class="fas fa-cart-arrow-down"></i>  <?php echo e(Cart::content()->count()); ?></a>  
                <?php if(Auth::user()): ?>
                    <?php if(Auth::user()->isAdmin()): ?>
                        <a class="dropdown-item" href="<?php echo e(route('products.index')); ?>">Admin</a>  
                    <?php endif; ?>
                    <a class="dropdown-item" href="<?php echo e(route('users.logout')); ?>">Déconnexion</a>  
                <?php else: ?>
                    <a class="dropdown-item" href="<?php echo e(route('users.create')); ?>">Inscription</a>
                    <a class="dropdown-item" href="<?php echo e(route('users.login')); ?>">Connexion</a>  
                </div>
                <?php endif; ?>
            </li>
        </ul>
    </div>
</nav>