The Eloquent ORM is quite nice, though I\'m wondering if there is an easy way to setup MySQL transactions using innoDB in the same fashion as PDO, or if I would have to exte
If any exception occurs, the transaction will rollback automatically.
Laravel Basic transaction format
try{
DB::beginTransaction();
/*
* SQL operation one
* SQL operation two
..................
..................
* SQL operation n */
DB::commit();
/* Transaction successful. */
}catch(\Exception $e){
DB::rollback();
/* Transaction failed. */
}