The error "502 Bad Gateway" is most often related to a bad route.
I'd verify the route named 'dashboard' is valid and works.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am trying to figure out how I can set a cookie on a redirect instead of a response. Can anyone help me figure out how to accomplish this? The code I have now (below) causes a 502 Bad Gateway error.
Cookie::queue($name, $value);
return redirect()->route('dashboard');
@TerrePorter Thanks for the tip. I found an error in my error.log file and did some troubleshooting from there. It was actually a NGINX configuration issue.
Solved with this: http://stackoverflow.com/a/13896157/490239
Please or to participate in this conversation.