title: Laravel check for constraint violation
body: <p>I was curious if there is a way we can check if there is a constraint violation error when delete or insert a record into the database.</p>
  
  <p>The exception thrown is called 'QueryException' but this can be a wide range of errors. Would be nice if we can check in the exception what the specific error is.</p>