Laravel - Getting Started - Manually Using Transactions
If you would like to begin a transaction manually and have complete control over rollbacks and commits, you may use the
beginTransaction method provided by the
use Illuminate\Support\Facades\DB; DB::beginTransaction();
You can rollback the transaction via the
Lastly, you can commit a transaction via the
DBfacade's transaction methods control the transactions for both the query builder and Eloquent ORM.