Best Practice for Laravel Asynchronous Requests

Viewed 18494

I have a Laravel application. The application loading perfectly fine, when I only make 3-10 API per page in my controller. Now, I start to see the latency when I start making 200 API requests per page in my controller.

Since Laravel is MVC.

All the code in the controller need to be fully executed and finished, and then it will send all the data/variables to the view. But that is leading to a lot of latency.

I’m thinking to perform that APIs call asynchronously, but I am not sure which one is the best move,

I did a quick search, I found :

Any directions/suggestions on this will mean a lot to me, and others that faced this issue.

1 Answers
Related