文章

[Fixed] some windows chrome, scrolling has glitch position not accurate

  [Fixed] some windows chrome, scrolling has glitch position not accurate Smooth Scrolling Flag 📜 Chrome has an experimental "smooth scrolling" feature that can sometimes conflict with your system's settings, leading to jerky or inaccurate scrolling. Disabling it can often fix the issue. Type chrome://flags into the Chrome address bar and hit Enter . In the search bar at the top, type "Smooth scrolling." From the dropdown menu for the "Smooth scrolling" flag, select Disabled. Click Relaunch at the bottom of the page.

[Laravel][ATOMIC] DB::transaction, DB::beginTransaction

  DB::beginTransaction()   will only begin a transaction, while for   DB::transaction()   you must pass a Closure function that will be executed   inside   a transaction. So this: DB:: transaction ( function () { // Do something and save to the db... }); is the same as this: // Open a try/catch block try { // Begin a transaction DB:: beginTransaction (); // Do something and save to the db... // Commit the transaction DB:: commit (); } catch (\ Exception $e ) { // An error occured; cancel the transaction... DB:: rollback (); // and throw the error again. throw $e ; } As you can see,  DB::transaction()  is a "helper" function to avoid writing code to catch errors, begin a transaction, commit the transaction, and optionally rollback (cancel the transaction) if an error occured. If you have a more complex logic, or need an specific behaviour, you will manually build your transaction; if your lo...