title: Nested Transactions in Laravel 4.2 and MySQL
body: <p>In reference to this point: <a href="https://www.php.net/manual/en/pdo.begintransaction.php#109753" rel="nofollow noreferrer">https://www.php.net/manual/en/pdo.begintransaction.php#109753</a></p>
  
  <p>The following code works, but can it be run safely on production?</p>
  
  <pre><code>DB::beginTransaction();
  try {
      // update statements
      DB::transaction(function(){
          // update statements
      });
      // update statements
      DB::commit();
  } catch (Exception $e) {
      DB::rollback();
  }
  </code></pre>