title: Laravel rollback saved changes if error is encountered while saving child model
body: <p>For example, I have a User hasMany Books relationship.</p>
  
  <p>Let's take this scenario.</p>
  
  <p>I <b>successfully</b> saved the User (which is the parent model), but there was an error while saving one of the Books (which is the child model). Is it possible to delete the saved parent <i>(only if there are errors encountered while saving the parent and/or child)</i> then redirect to another page?</p>
  
  <p>Actually I don't have any code to provide. I'm currently planning on how to build the code, and I have thought of this idea.</p>