'undefined' is a hint. It is used in JavaScript when you try to use a variable or property which is never set.
I don't see any problems in the shared code. try to follow out the redirects by monitring the network activity in your browser.
Please close the post you resolve the issue.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community