Build states, transitions, guards, and metadata in the visual editor. No PHP needed yet.
Open Export, choose "PHP (Laravel)", and copy or download the generated file.
Place it in your Laravel config directory and register with symflow-laravel. Done.
Generates a PHP config file built from symflow-laravel's data classes: WorkflowDefinition, Place, Transition, and WorkflowMeta.
Guards from the visual editor are emitted directly onto each transition's guard property. Access control built in.
Model parallel forks (AND-split), synchronization (AND-join), and exclusive choices (OR) visually. Multi-from and multi-to transitions survive the PHP export intact.
Set consume and produce weights for advanced Petri-net modeling. Weights flow through to the PHP config automatically.
Uses PHP enums for workflow type (WorkflowType::StateMachine, WorkflowType::Workflow) and marking store type (MarkingStoreType::Method, MarkingStoreType::Property).
Catch unreachable states, dead transitions, and structural errors in the editor — before they become runtime bugs in Laravel.
Import existing Symfony YAML, edit visually, export as Laravel PHP config. Migrate between frameworks without rewriting by hand.
The exported file is complete — imports, definition, metadata, and marking store. Drop it into your Laravel project and register it.
Actual SymFlowBuilder output for a simple order workflow with guards. Drop it straight into your Laravel project.
<?php
// Generated by symflow
use Laraflow\Data\Place;
use Laraflow\Data\Transition;
use Laraflow\Data\WorkflowDefinition;
use Laraflow\Data\WorkflowMeta;
use Laraflow\Enums\MarkingStoreType;
use Laraflow\Enums\WorkflowType;
return [
'definition' => new WorkflowDefinition(
name: 'order',
type: WorkflowType::StateMachine,
places: [
new Place(name: 'draft'),
new Place(name: 'submitted'),
new Place(name: 'approved'),
new Place(name: 'fulfilled'),
],
transitions: [
new Transition(
name: 'submit',
froms: ['draft'],
tos: ['submitted'],
),
new Transition(
name: 'approve',
froms: ['submitted'],
tos: ['approved'],
guard: 'is_granted("ROLE_ADMIN")',
),
new Transition(
name: 'fulfill',
froms: ['approved'],
tos: ['fulfilled'],
),
],
initialMarking: ['draft'],
),
'meta' => new WorkflowMeta(
name: 'order',
type: WorkflowType::StateMachine,
markingStore: MarkingStoreType::Method,
initialMarking: ['draft'],
supports: 'App\\Models\\Order',
property: 'status',
),
];