Laravel Workflow

Submitted by rmcdaniel - 1 year ago

Workflows are more powerful than Laravel's job chaining or batching because they provide a way to implement complex, multi-step processes that can be resumed from a previous state if they fail or crash.

use Workflow\ActivityStub;
use Workflow\Workflow;

class MyWorkflow extends Workflow
    public function execute()
        return [
            yield ActivityStub::make(TestActivity::class),
            yield ActivityStub::make(TestOtherActivity::class),
            yield ActivityStub::all([