Logging out via a link in Laravel
When you run php artisan make:auth, the default app.php in Laravel 5.5 does it like this: <a href=”https://stackoverflow.com/questions/43087648/{{ route(“logout’) }}” onclick=”event.preventDefault(); document.getElementById(‘logout-form’).submit();”> Logout </a> <form id=”logout-form” action=”https://stackoverflow.com/questions/43087648/{{ route(“logout’) }}” method=”POST” style=”display: none;”> {{ csrf_field() }} </form>