Skip to content

Docs: Enhance moveCard() examples with database transaction support#87

Open
AtemD wants to merge 1 commit intorelaticle:4.xfrom
AtemD:patch-1
Open

Docs: Enhance moveCard() examples with database transaction support#87
AtemD wants to merge 1 commit intorelaticle:4.xfrom
AtemD:patch-1

Conversation

@AtemD
Copy link

@AtemD AtemD commented Mar 3, 2026

Summary
Added examples for custom card movement logic with transaction handling to ensure data integrity.

PR Description:
What does this PR do?
Updates the Integration Patterns documentation to include a recommended DB::transaction wrapper when overriding the moveCard() method.

Why is this necessary?
The current documentation shows custom logic executing after parent::moveCard() has already committed to the database. If a developer implements multi-table logic (like creating an activity log or triggering a complex state machine) and that logic throws an exception, the database becomes out of sync (the card moved, but the dependent logic failed).

Wrapping the method in a transaction ensures true atomicity. If the developer's custom logic fails, the card movement rolls back safely, and Livewire should gracefully returns the card to its original column on the frontend. This makes Flowforge much safer for enterprise or for such specific use cases!

Added examples for custom card movement logic with transaction handling to ensure data integrity.
@AtemD AtemD changed the title Docs: Enhance moveCard() examples with transaction support docs to ensure data integrity Docs: Enhance moveCard() examples with database transaction support Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant