Level 46
Jul 19, 2017
1
Level 2
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
Please or to participate in this conversation.