title: Lumen/Eloquent transaction rollback is not working
body: <p>I have this function that permit to save in 4 tables.
  I have an error at that line <code>$stade-&gt;save()</code>  ( it's normal it's a test ) so it should not save the club <code>$club-&gt;save()</code> that is 4 lines before.</p>
  <p>But I don't understand why, the rollback() in the catch is not doing is job and I still have a record in club table. And yes I receive the 409 error so the application is passing by the catch and so by the <code>DB::rollback()</code></p>
  <p>Can someone help me please to understand why the rollback is not working ?</p>
  <pre><code>DB::beginTransaction();
          try {
              $club = new Club();
              $club-&gt;login = $request-&gt;input('login');
              $club-&gt;email = $request-&gt;input('email');
              $plainPassword = $request-&gt;input('password');
              $club-&gt;password = app('hash')-&gt;make($plainPassword);
              $club-&gt;nom_equipe = $request-&gt;input('nom_club');
              $club-&gt;nation_id = $request-&gt;input('nation_id');
              $club-&gt;argent = $this-&gt;argentDepart;
              $club-&gt;save();
  
              $stade = new Stade();
              $stade-&gt;club_id = $club-&gt;id;
              $stade-&gt;save();
  
              $installation = new Installations();
              $installation-&gt;club_id = $club-&gt;id;
              $installation-&gt;save();
  
              $compositionTactique = new CompositionTactique();
              $compositionTactique-&gt;club_id = $club-&gt;id;
              $compositionTactique-&gt;save();
  
              DB::commit();
  
              //return successful response
              return response()-&gt;json(['user' =&gt; $club-&gt;nom_equipe, 'message' =&gt; 'CREATED'], 201);
          } catch (\Exception $e) {
              DB::rollback();
  
              //return error message
              return response()-&gt;json(['message' =&gt; $e], 409);
          }
  </code></pre>