title: How to handle multiple concurrent updates in Laravel Eloquent?
body: <p>Laravel 5.5</p>
  
  <p>I'm wondering how to properly handle the possible case of multiple updates to the same records by separate users or from different pages by the same user.</p>
  
  <p>For example, if an instance of Model_1 is read from the database responding to a request from Page_1, and a copy of the same object is loaded responding to a request from Page_2, how best to implement a mechanism to prevent a second update from clobbering the first update? (Of course, the updates could occur in any order...).</p>
  
  <p>I don't know if it is possible to lock records through Eloquent (I don't want to use <code>DB::</code> for locking as you'd have to refer to the underlying tables and row ids), but even if it were possible, Locking when loading the page and unlocking when submitting wouldn't be proper either (I'm going to omit details).</p>
  
  <p>I think detecting that a previous update has been made and failing the subsequent updates gracefully would be the best approach, but do I have to do it manually, for example by testing a timestamp (updated_at) field?</p>
  
  <p>(I'm supposing Eloquent doesn't automatically compare all fields before updating, as this would be somewhat inefficient, if using large fields such as text/binary)</p>