Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect transactions #30

Open
Yannx79 opened this issue May 24, 2024 · 0 comments
Open

Protect transactions #30

Yannx79 opened this issue May 24, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Yannx79
Copy link
Owner

Yannx79 commented May 24, 2024

use Illuminate\Support\Facades\DB;
 
DB::transaction(function () {
    DB::update('update users set votes = 1');
 
    DB::delete('delete from posts');
}, 5);
@Yannx79 Yannx79 added enhancement New feature or request help wanted Extra attention is needed labels May 24, 2024
@Yannx79 Yannx79 added this to the Business logic milestone May 24, 2024
@Yannx79 Yannx79 self-assigned this May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant