Response and run continue by event, queue listener Laravel

Published

I want response client with json after that queue listener continue to run process. How can i do that?

// Event
'AppEventsAsyncEvent' => [
   'AppListenersSendTaskResponse',
   'AppListenersHandleData', 
]

//SendTaskResponse
public function Handle(AsyncEvent $event) {
   return response()->json([1111],200);
}

// HandleData
public function Handle(AsyncEvent $event) {
   // Handle more code
}

So after i implement ShouldQueue they already run. But nothing response to client. I don’t know why. Hope anyone can help me. Thanks so much.

Source: Laravel

Published
Categorised as laravel Tagged

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq