PHP code snippet – How to check if query is successfully inserted laravel?
try { DB::beginTransaction(); // your code DB::commit(); }catch (Exception $e) { DB::rollback(); // other actions }
try { DB::beginTransaction(); // your code DB::commit(); }catch (Exception $e) { DB::rollback(); // other actions }