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
Post a Comment