1. Go to this page and download the library: Download imtiaz-hasan/flowforge 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/ */
imtiaz-hasan / flowforge example snippets
use Flowforge\Facades\Flowforge;
Flowforge::define('welcome')
->webhook()
->email('greet', ['to' => '{{ trigger.email }}', 'subject' => 'Welcome', 'body' => 'Glad you are here.'])
->save();
use Flowforge\Contracts\Node;
use Flowforge\Engine\NodeContext;
use Flowforge\Engine\NodeResult;
class SlackNode implements Node
{
public function handle(NodeContext $context, array $config): NodeResult
{
Http::post($config['webhook_url'], ['text' => $config['text']]);
return NodeResult::ok(['posted' => true]);
}
}