-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
Hi,
I was reading through the docs, and I see that for business transactions, you say that you can keep track of the lock version on the page.
But in your controller, I guess, you need to do the following?
class SomeController {
public function update(Request $request, SomeModel $model) {
// since $model is retrieved from the database, it will have the most recent lock...
// am I right in thinking that we need to manually set the lock version here always?
$model->lock_version = $request->get('lock_version');
// This will then throw an exception when the lock version of the database differs from what I got from the $request
$model->save();
}
}
Is this correct, or is there a more intelligent way to pass this on?
Metadata
Metadata
Assignees
Labels
No labels