В плане, он же блочит возможность изменений, пока не завершится прошлая транзакция.
A shared lock prevents the selected rows from being modified until your transaction is committed:
Alternatively, you may use the lockForUpdate method. A "for update" lock prevents the selected records from being modified or from being selected with another shared lock:
Ну, это, мягко говоря, огромное преувеличение :)
\DB::transaction(function() use($balance_id) {
$balance = \App\Models\Balance::lockForUpdate()->find($balance_id);
if($balance->balance > 10){
//do stuff
}
)};
curl -U user:password --proxy http://proxy_url:proxy_port https://httpbin.org/ip --proxy-anyauth -vvv