1. Go to this page and download the library: Download tarfin-labs/event-machine library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tarfin-labs / event-machine example snippets
// Without state machines: scattered conditionals, hidden rules, impossible to test
if ($order->status === 'pending' && $user->can('approve') && !$order->isExpired()) {
if ($order->total > 10000 && !$order->hasSecondApproval()) {
// More nested logic...
}
}