Use the visual editor to create states, transitions, guards, and metadata. No PHP needed yet.
Click Export, select "PHP (Laravel)", and copy or download the generated config file.
Place the file in your Laravel project's config directory and register it with symflow-laravel. Done.
Exports a ready-to-use PHP config file using symflow-laravel's data classes: WorkflowDefinition, Place, Transition, and WorkflowMeta.
Guard expressions configured in the visual editor are exported directly into the transition's guard property. Access control built in.
Model parallel forks (AND-split), synchronization (AND-join), and exclusive choices (OR) visually. The PHP export preserves multi-from and multi-to transitions.
Configure consume and produce weights on transitions for advanced Petri net modeling. Weights are exported 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 visual editor before exporting. Ship valid configs every time.
Import your existing Symfony YAML, edit visually in SymFlowBuilder, then export as Laravel PHP config. Migrate workflows between frameworks effortlessly.
The exported PHP file is complete — includes imports, definition, metadata, and marking store config. Copy the file into your Laravel project and register it.
This is the actual output from SymFlowBuilder for a simple order workflow with guards. Copy it directly 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',
),
];