statuses, statuses_registry), which may conflict with existing state-tracking systems (e.g., states table in another package). Mitigation: Schema naming is configurable post-publish.statuses_registry for historical data. Risk: Data integrity issues if not handled carefully.statuses_registry supports this, but custom extensions may be needed for compliance.WorkflowTransitioned).GET /orders/{id}/workflow).config, migrations, stubs).workflow_id to existing tables).HasWorkflow trait on Eloquent models.use Flowra\Traits\HasWorkflow;
class Order extends Model {
use HasWorkflow;
protected $workflowClass = Workflow::class;
}
php artisan flowra:workflow OrderWorkflow
// Example guard: Only allow "Approve" if order is "Paid"
public function canApprove(Order $order): bool {
return $order->paid_at !== null;
}
config/flowra.php.Workflow, Transition) via service providers.status/state tables. Use Flowra’s table config to rename.Order, Ticket).flowra:workflow, flowra:transition).statuses/statuses_registry tables.statuses_registry provides audit trails. Use Laravel’s logging for guard/action failures.WorkflowException or extend Transition to handle failures (e.g., retry logic).statuses table). Use indexes on model_id and workflow_id.ShipOrderAction).php-redis).statuses_registry grows with transitions. Mitigation:
How can I help you explore Laravel packages today?