Skip to content

Commit

Permalink
Enabling logout
Browse files Browse the repository at this point in the history
  • Loading branch information
chrux committed Jul 22, 2019
1 parent 9df6ef0 commit 496f8c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resources/views/layouts/nav.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
<a href="{{ route('questions.index') }}">{{ __('Questions') }}</a>
@endif
@auth
<a href="{{ route('logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">{{ __('Logout') }}</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
@csrf
</form>
@else
@if (Route::has('register'))
<a href="{{ route('register') }}">{{ __('Register') }}</a>
Expand Down

0 comments on commit 496f8c4

Please sign in to comment.