我正在尝试弄清楚如何正确使用/测试lockforupdate,但我发现它的功能不像我预期的那样这只是测试publicfunctionindex(){returndd(\DB::transaction(function(){if(\Auth::guard('user')->check()){$model=\App\Models\User::find(1)->lockForUpdate();sleep(60);$model->point=100000;$model->save();}else{$model=\App\Models\User::find(1);$model->point=99