Pessimistic Locking in Laravel Eloquent with refreshForUpdate()

  • by Paul Redmond
  • Published on Laravel News
  • Curated on
  • News
Pessimistic Locking in Laravel Eloquent with refreshForUpdate() - Laravel News
Image: Laravel News

Laravel 13.27 adds refreshForUpdate() to Eloquent, reloading a model under lockForUpdate() so you can take a pessimistic lock without requerying by key.


The post Pessimistic Locking in Laravel Eloquent with refreshForUpdate() appeared first on Laravel News.

Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox.