Change logout to POST endpoint

This commit is contained in:
Jonathan Reinink 2019-04-15 19:39:49 -04:00
parent f357317f46
commit 72262482e2
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@
<div slot="dropdown" class="mt-2 py-2 shadow-lg bg-white rounded text-sm">
<inertia-link class="block px-6 py-2 hover:bg-indigo hover:text-white" :href="route('users.edit', page.props.auth.user.id)">My Profile</inertia-link>
<inertia-link class="block px-6 py-2 hover:bg-indigo hover:text-white" :href="route('users')">Manage Users</inertia-link>
<inertia-link class="block px-6 py-2 hover:bg-indigo hover:text-white" :href="route('logout')">Logout</inertia-link>
<inertia-link class="block px-6 py-2 hover:bg-indigo hover:text-white" :href="route('logout')" method="post">Logout</inertia-link>
</div>
</dropdown>
</div>

View File

@ -14,7 +14,7 @@
// Auth
Route::get('login')->name('login')->uses('Auth\LoginController@showLoginForm');
Route::post('login')->name('login.attempt')->uses('Auth\LoginController@login');
Route::get('logout')->name('logout')->uses('Auth\LoginController@logout');
Route::post('logout')->name('logout')->uses('Auth\LoginController@logout');
// Dashboard
Route::get('/')->name('dashboard')->uses('DashboardController')->middleware('auth');