title: transaction not working in laravel
body: <p>I have a problem with transactions in laravel.
  When I try to do this operation with the following code, the error appears on the screen as if I had no transaction.</p>
  
  <pre><code>\DB::transaction(function() use ($movement, $movementRows) {
     $movement-&gt;save();
     $movement-&gt;rows()-&gt;saveMany($movementRows);
  });
  </code></pre>
  
  <p>and when I try to do it with the code below the first object is saved although the second one fails.</p>
  
  <pre><code>\DB::beginTransaction();
  try {
       $movement-&gt;save();
       $movement-&gt;rows()-&gt;saveMany($movementRows);
        \DB::commit();
        $success = true;
  } catch (\Exception $e) {
      $success = false;
      \DB::rollback();
  }
  
  if ($success) {
      // the transaction worked ...
  }
  </code></pre>