Skip to content

Instantly share code, notes, and snippets.

@yasaryousuf
Last active March 10, 2018 10:33
Show Gist options
  • Save yasaryousuf/2e9e702e47c9969fc17f5481b89d274f to your computer and use it in GitHub Desktop.
Save yasaryousuf/2e9e702e47c9969fc17f5481b89d274f to your computer and use it in GitHub Desktop.
[laravel-logout]
<li>
<a href="{{ route('logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
<i class="fa fa-sign-out"></i>Logout
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
{{ csrf_field() }}
</form>
</li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment