注销功能不会使会话无效 [英] logout function not invalidating session

查看:79
本文介绍了注销功能不会使会话无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上问题是注销.但是,花了一整天的时间之后,我才知道该会话的工作时间很晚.我的意思是说,当我登录然后第一次尝试注销时,它可以正常工作.但是在第二次尝试中它不能正常工作,在这段时间内请求没有出现在控制器中,但是当我删除浏览器历史记录时,它可以正常工作.另一方面,如果两次尝试之间的差值为10分钟,则它可以正常工作.

Basically problem is logout. But after spending whole day on it I came to know that session is working late. What i mean to say is that when I login and then try logout on first attempt it work fine. But on second attempt it is not working fine during this time request is not coming in controller but when I delete browser history it work perfect.On the other hand if difference between two attempts is 10 minutes then it work fine.

我不知道这是服务器问题还是laravel问题.但是我尝试了所有方法,包括作曲家的命令.

I don't know if it is server issue or laravel issue. But I tried all the things including composer commands.

我想在每次尝试时快速注销.

I want to logout quickly on every attempt.

推荐答案

Salaam Bilal,请尝试在视图中添加以下代码并进行渲染以查看是否注销.如果可行,我会解释一下.

Salaam Bilal, try adding the following code in the view and render to see if it log outs. I'll explain this if it works.

<form method="POST" action="{{url('/logout')}}">
{{ csrf_field() }}
<button type="submit">Logout</button>
</form> 

这篇关于注销功能不会使会话无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆