Question : Lumen framework promise
Answered by : healthy-hummingbird-xrq6pxk75v7x
use GuzzleHttp\Promise\Promise;
$promise = new Promise();
$promise->then( // $onFulfilled function ($value) { echo 'The promise was fulfilled.'; }, // $onRejected function ($reason) { echo 'The promise was rejected.'; }
);
Source : https://github.com/guzzle/promises | Last Update : Tue, 15 Dec 20