Laravel 5 refresh login page after session times out -


i have seen many posts similar question , talk redirecting login page when of course logged in , session times out.

my problem login page using auth:guest middle-ware.

if on login page... 120mins , session times out , enter credentials , click submit button tokenmismatchexception error.

i want refresh login page when session has expired such has new csrf token.

thanks, k

add following app/exception/handler

use illuminate\session\tokenmismatchexception; 

and render method

if ($e instanceof tokenmismatchexception) {      if ( !$request->ajax() ) {          return redirect()->back()->withinput();      } } 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -