Execute code outside of transaction only when it commits in Laravel 8.x
December 3, 2020 — Sometimes, there might be a case where you would want some of the code that lies outside of the transaction to be executed only when the corresponding transaction commits successfully and if in any case, it’s a rollback, that code shouldn’t be executed.