You can follow the following steps to troubleshoot:
Check whether the cookie in the logged in post request carries session information;
The AuthController that handles login requests has a field redirectPath, which represents the jump page after successful login. Check whether this value is correct;
laravel. Let’s talk about the idea of implementing this function without the framework under normal circumstances
You can get the current url when jumping to the landing page. When jumping to the landing page, splice it into a get parameter of the landing page, as shown below:
Then when submitting the login information, determine whether the url parameter has a value, and then jump to the page before login
You can follow the following steps to troubleshoot:
Check whether the
cookie
in the logged inpost
request carriessession
information;The
AuthController
that handles login requests has a fieldredirectPath
, which represents the jump page after successful login. Check whether this value is correct;I don’t understand
laravel
. Let’s talk about the idea of implementing this function without the framework under normal circumstancesYou can get the current url when jumping to the landing page. When jumping to the landing page, splice it into a
get
parameter of the landing page, as shown below:Then when submitting the login information, determine whether the url parameter has a value, and then jump to the page before login