I want to Rollback or Reset Auto Increment ID from multiple mysql tables after Transaction Fail in Laravel 5.6.
DB::beginTransaction();
try {
//My Database Queries goes here
DB::commit();
}
catch (\Exception $e) {
DB::rollback();
}
Simply what I want is, I want to write some Query to Rollback Auto Increment IDs here
catch (\Exception $e) {
DB::rollback();
}
after DB::rollback()
executed.
Can any body suggest me a way to do that..?