How to queue requisitions for a larivel api?

1

I have an api made in laravel 5.6, where requests can not be executed simultaneously and are queued to be executed in the requisition order. It's complicated to explain an example, but if anyone can help me I'd like to know how to solve this.

    
asked by anonymous 29.11.2018 / 23:33

1 answer

0

You can use a native feature of Laravel, the Queues. Roughly they are used to register your tasks in a database table and then go in / out in the background.

Read the documentation and see some examples: link

For example, queues allow you to delay processing a time-consuming task, such as sending an email, until a later time. Delaying these time-consuming tasks dramatically speeds up Web requests for your application.

So for your case using the Queues will go well.

    
03.12.2018 / 14:21