Skip to content

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

Merged
ManukMinasyan merged 1 commit intorelaticle:4.xfrom
AtemD:patch-1
Mar 4, 2026
Merged

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

Conversation

@AtemD
Copy link
Contributor

@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
@ManukMinasyan ManukMinasyan merged commit bfe4e44 into relaticle:4.x Mar 4, 2026
1 check passed
@ManukMinasyan
Copy link
Contributor

@AtemD Thank you

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.

2 participants