jeudi 29 août 2019

Laravel Eloquent ORM Transactions: Why we need ROLLBACK?

Why we need DB::rollback() when we can execute multiple queries without using it. Such as follows:

DB::beginTransaction();
 //database queries here
DB::commit();

In the above case, even if any statement fails, commit will never hit, and the transaction won't process.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/32blZbO
via IFTTT

Aucun commentaire:

Enregistrer un commentaire