Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Martha's avatar

rollback database record

Hi Laracasters , I want to know if there an ability , to rollback last database record when another insertion query isnot done .

I am building payment module for booking room. my logic as follows : 1- update payment table for this user if ( 1 success ) 2- update room record as reserved if ( 2 success ) 3- get credit from user with third part (Auth.NET) if ( 3 success ) return "process complete" if ( 3 fail ) rollback 2 and 1

0 likes
1 reply

Please or to participate in this conversation.