1. Go to this page and download the library: Download nowi5/laravel-workflow 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/ */
nowi5 / laravel-workflow example snippets
namespace App\Workflow;
use App\Jobs\WorkflowStepJob;
use Workflow\Workflow;
class ExampleWorkflow extends Workflow {
public $name = "TestWorkflow";
public $version = "1.0.0";
public function execute(){
// Adding steps to the workflow
$this->addStep("step1", WorkflowStepJob::class, ["param1" => "some value"]);
// Setting the logic for the workflow
$this->addLogic("step1", "step2");
}
}