diff --git a/resources/views/layouts/admin.blade.php b/resources/views/layouts/admin.blade.php index e885183e..faadc2c8 100644 --- a/resources/views/layouts/admin.blade.php +++ b/resources/views/layouts/admin.blade.php @@ -195,9 +195,17 @@ cancelButtonColor: '#d33', confirmButtonText: 'Log out' }, function () { - window.location = $(that).attr('href'); + $.ajax({ + type: 'POST', + url: '{{ route('auth.logout') }}', + data: { + _token: '{{ csrf_token() }}' + },complete: function () { + window.location.href = '{{route('auth.login')}}'; + } }); }); + }); @endif