Support the ongoing development of Laravel.io →
posted 8 years ago
Views
Last updated 2 years ago.
0

Assuming your long running function is server side, you are better off using a "pull" approach. Have some long polling code client side that sends a request to check the status of the job every few seconds and updates the client UI accordingly.

Obviously, the server needs to be able to report progress.

You could also use websockets but this is much more complex and probably overkill.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

lrstndm lrstndm Joined 30 Mar 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.