/**
* This method is used to set the callback when the promise is resolved.
*/
public function then(callable $callback): Promise;
/**
* This method is used to set the callback when the promise is rejected.
*/
public function catch(callable $callback): Promise;
/**
* This method is used to set the callback when the promise is resolved or rejected.
*/
public function finally(callable $callback): Promise;
The then() method will help you create that promise callback when it has been fulfilled.
The catch() method will generate a callback for that promise when it is rejected.
finally() is the method used to set that callback when it's complete.