Prevent Browser's Back Button Login After Logout in Laravel 5

前端 未结 8 812
情歌与酒
情歌与酒 2020-12-01 02:50

I am new to Laravel 5 and trying to make a simple authentication page. My problem is i can logout properly after i click to logout link but if i click to back button of the

相关标签:
8条回答
  • 2020-12-01 03:52

    Try redirecting to a protected route with auth middleware:

    return redirect('home');
    

    so it will force redirect to the login page & the back button will not show the previous page

    0 讨论(0)
  • 2020-12-01 03:53

    Using this <a href={{$_SERVER['HTTP_REFERER']}}>back</a> comes handy.

    0 讨论(0)
提交回复
热议问题