Laravel DB Transactions

PHOTO EMBED

Mon May 11 2020 14:51:53 GMT+0000 (UTC)

Saved by @tigran #php

DB::transaction(function () {
    DB::table('users')->update(['votes' => 1]);

    DB::table('posts')->delete();
}, 5);
content_copyCOPY

https://laravel.com/docs/7.x/database