navbar.blade.php 910 B

12345678910111213141516171819202122
  1. <!-- Authentication Links -->
  2. @if (Auth::guest())
  3. <li><a href="{{ url('/login') }}">Login</a></li>
  4. <li><a href="{{ url('/register') }}">Register</a></li>
  5. @else
  6. <li class="dropdown">
  7. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
  8. {{ Auth::user()->name }} <span class="caret"></span>
  9. </a>
  10. <ul class="dropdown-menu" role="menu">
  11. <li><a class="scroll" href="{{ route('logout') }}"
  12. onclick="event.preventDefault();
  13. document.getElementById('logout-form').submit();">
  14. <i class="fa fa-btn fa-sign-out"></i>Вихід
  15. </a></li>
  16. <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
  17. @csrf
  18. </form>
  19. </ul>
  20. </li>
  21. @endif