Skip to content

Commit 326322f

Browse files
committed
wip
1 parent 668ffde commit 326322f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

queries.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ Alternatively, you may use the `lockForUpdate` method. A "for update" lock preve
11911191
->lockForUpdate()
11921192
->get();
11931193

1194-
It is recommended, but not obligatory, to wrap pessimistic locks inside a [transaction](/docs/{{version}}/database#database-transactions), especially when you require the data retrieved to not be altered on the database until the entire transaction is finished. If the transaction fails, the locks will be freed and any changes will be rolled back:
1194+
While not obligatory, it is recommended to wrap pessimistic locks within a [transaction](/docs/{{version}}/database#database-transactions). This ensures that the data retrieved remains unaltered in the database until the entire operation completes. In case of a failure, the transaction will roll back any changes and release the locks automatically:
11951195

11961196
DB::transaction(function () {
11971197
$sender = DB::table('users')

0 commit comments

Comments
 (0)