Description
A package for the Laravel web framework that provides tools for defining and managing workflows and activities.
1. Create a workflow
use function Workflow\activity;use Workflow\Workflow; class MyWorkflow extends Workflow{ public function execute($name) { $result = yield activity(MyActivity::class, $name); return $result; }}
2. Create an activity
use Workflow\Activity; class MyActivity extends Activity{ public function execute($name) { return "Hello, {$name}!"; }}
3. Run the workflow
use Workflow\WorkflowStub; $workflow = WorkflowStub::make(MyWorkflow::class);$workflow->start('world');
$workflow->output();=> 'Hello, world!'
Recent Courses on Laravel Daily
Practical Laravel Security: Packages, Secrets, Supply-Chain Attacks
7 lessons
43 min read
Laravel 13 Starter Kit Teams and Customizations
10 lessons
33 min
Roles and Permissions in Laravel 13
14 lessons
57 min