Change logout to POST endpoint
This commit is contained in:
parent
f357317f46
commit
72262482e2
|
@ -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>
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue