DB::beginTransaction(); try { DB::insert(...); DB::commit(); } catch (Exception $e) { DB::rollback(); throw $e; } catch (Throwable $e) { DB::rollback(); throw $e; }