-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Zero wallet balance when querying the wallet with Query Builder #993
Comments
I've been looking and debugging for a long time. I don't see a bug. At the moment I've removed the "bug" tag until a detailed case from your side. |
I was running the code inside a PHPUnit test class that uses the |
This event makes a query to update the balance in the wallet table. If you do DB::commit() before your query, the data will be up-to-date.
|
Inside the committing method:
|
In general, the functionality appeared in the framework only for the sake of our project. https://github.com/laravel/framework/pull/44608/files |
Describe the bug
When using the Laravel Query Builder I get the balance as 0 , But when I switch to Laravel Eloquent ORM I get the correct balance 5000.
Now this query will return the correct wallet but with the balance 0:
But this query will return the correct wallet with the correct balance 5000
I can confirm that the transactions was created.
To Reproduce
Steps to reproduce the behavior:
Server:
The text was updated successfully, but these errors were encountered: