Skip to content
Advertisement

Laravel Http request to route sends forever

I want to have a link in an email that send to the user, the link is the url of the site and has an api token for the user to authenticate with.

however I am trying to send an api request to get the user details so I can authenticate the user and redirect them to the relavent page, however doing this I end up with a request the spins endlessly.

what could be the issue and if there are any other solutions please let me know.

the link/request looks like this

JavaScript

The controller that handles the request

JavaScript

Also when I send the request it gets stuck and I have to restart my php artisan serve again to make more requests, and every time i do so, It opens up on a new port, 8001,8002,8003 etc

Advertisement

Answer

You can make a call back to the app itself like this:

JavaScript

Update the variables to match your implementations.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement