Creating a logout link using a GET request in Laravel 8 & Fortify

If you are using Fortify you have probably noticed the only way out of the box to invoke a logout is via a POST request


I still need to optimize this a bit but you can call the same Fortify Controller method via the route.


Route::get('/logout', 'Laravel\Fortify\Http\Controllers\AuthenticatedSessionController@destroy');