1 year ago

Return function result to caller and then do some tasks in the background

Posted 1 year ago by lararocks

Hello there,

I'm developing a mobile app that posts some data and images via Laravel API endpoint.

The thing is the function takes time until it saves the post and write the images to the disk before it returns the result to the mobile app and shows the thank you message.

Is there a way where I can make my Laravel function saves the post, returns the post ID, and then continue writing images to disk so I can reduce the time the user waits for the thank you message?


Please sign in or create an account to participate in this conversation.