php - Laravel 5: Send a response first, then process request in controller -


i'm working classic paypal api , i'm stuck on problem of responding before process request data.

public function store() {     // send empty http 200 ok response acknowledge receipt of notification     response("", 200);     // build required acknowledgement message out of notification received     // once hits point, nothing sent client. } 

i know in order client receive http 200 response, need add return keyword in front of it. however, if return response immediately, processing of request not occur. looked before , after middlewares, unfortunately not asynchronous. there way of accomplishing send process in laravel 5?

i found hack solution problem:

try {     return response("", 200); } {     // controller logic here } 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -