test lockForUpdate laravel code example
Example: test lockForUpdate laravel
DB::transaction(function () { echo 1; User::where('id', 33)->lockForUpdate()->get(); echo 2; sleep(10);});
DB::transaction(function () { echo 1; User::where('id', 33)->lockForUpdate()->get(); echo 2; sleep(10);});