Right, so the principle of "make things asynchronous if you can", move them out of the request/response pipeline. The usage of exec/curl is a bit of an unexpected one but then again, yeah why not, since it's PHP this is probably the most simple way to make it async.
Absolutely, that's a much more complete and solid solution ... the usage of exec/curl is more a quick & dirty hack, but maybe it's good enough for something non-critical.
Right, so the principle of "make things asynchronous if you can", move them out of the request/response pipeline. The usage of exec/curl is a bit of an unexpected one but then again, yeah why not, since it's PHP this is probably the most simple way to make it async.
I would actually use the Laravel Queue, which would allow me to actually track whether the request completed and how long it took.
Absolutely, that's a much more complete and solid solution ... the usage of exec/curl is more a quick & dirty hack, but maybe it's good enough for something non-critical.
Finally, I move this code to Laravel Queues and it's the first time I use em for the six years of using Laravel :) Thanks for it!