One option would be to add it to the auth middleware, before the redirect..
https://github.com/laravel/laravel/blob/5.2/app/Http/Middleware/Authenticate.php#L24
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I am working on laravel 5.2, and my requirement is that I need to pass some parameter to my project URL, http://mywebsite.com/?param=1 which I want to register as a session and then use it before login, but, what happens that laravel redirects to http://mywebsite.com/login and the param is lost and I can't find it in the login function of AuthenticateController
My Question is where i register my session before it gets redirected to /login
Reason: I don't want to show /login?param=1
Thanks
Please or to participate in this conversation.