Answers for "Lumen framework promise"

PHP
0

Lumen framework promise

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.';
    }
);
Posted by: Guest on December-08-2020

Browse Popular Code Answers by Language