Logout Method Changed
This commit is contained in:
parent
82e6ddef50
commit
3dbd804e23
|
|
@ -178,7 +178,17 @@
|
|||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{ route('customer.session.destroy') }}">{{ __('shop::app.header.logout') }}</a>
|
||||
<form id="customerLogout" action="{{ route('customer.session.destroy') }}" method="POST">
|
||||
@csrf
|
||||
|
||||
@method('DELETE')
|
||||
</form>
|
||||
|
||||
<a
|
||||
href="{{ route('customer.session.destroy') }}"
|
||||
onclick="event.preventDefault(); document.getElementById('customerLogout').submit();">
|
||||
{{ __('shop::app.header.logout') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
|
|||
/**
|
||||
* Logout.
|
||||
*/
|
||||
Route::get('logout', [SessionController::class, 'destroy'])->defaults('_config', [
|
||||
Route::delete('logout', [SessionController::class, 'destroy'])->defaults('_config', [
|
||||
'redirect' => 'customer.session.index'
|
||||
])->name('customer.session.destroy');
|
||||
|
||||
|
|
|
|||
|
|
@ -123,10 +123,17 @@
|
|||
<template v-slot:extra-navigation>
|
||||
<li>
|
||||
@auth('customer')
|
||||
<form id="customerLogout" action="{{ route('customer.session.destroy') }}" method="POST">
|
||||
@csrf
|
||||
|
||||
@method('DELETE')
|
||||
</form>
|
||||
|
||||
<a
|
||||
class="unset"
|
||||
href="{{ route('customer.session.destroy') }}">
|
||||
<span>{{ __('shop::app.header.logout') }}</span>
|
||||
href="{{ route('customer.session.destroy') }}"
|
||||
onclick="event.preventDefault(); document.getElementById('customerLogout').submit();">
|
||||
{{ __('shop::app.header.logout') }}
|
||||
</a>
|
||||
@endauth
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,18 @@
|
|||
@endif
|
||||
|
||||
<li>
|
||||
<a href="{{ route('customer.session.destroy') }}" class="unset">{{ __('shop::app.header.logout') }}</a>
|
||||
<form id="customerLogout" action="{{ route('customer.session.destroy') }}" method="POST">
|
||||
@csrf
|
||||
|
||||
@method('DELETE')
|
||||
</form>
|
||||
|
||||
<a
|
||||
class="unset"
|
||||
href="{{ route('customer.session.destroy') }}"
|
||||
onclick="event.preventDefault(); document.getElementById('customerLogout').submit();">
|
||||
{{ __('shop::app.header.logout') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue