bavix / laravel-wallet

It's easy to work with a virtual wallet
https://bavix.github.io/laravel-wallet/
MIT License
1.15k stars 230 forks source link

1062 Duplicate entry @682 #919

Closed onemoreahmad closed 8 months ago

onemoreahmad commented 8 months ago

Hello,

I have the exact same issue as here https://github.com/bavix/laravel-wallet/issues/682 I use the latest version ^10.1

When I do $user->deposit(10); it automatically create a wallet if not exists. and when I run the command again even after few minutes, I got the duplication error. It seems it always try to create a wallet without checking if it exists already or not.

I tried to reopen that issue but I couldn't, so I posted a new issue if it's a bug.

onemoreahmad commented 8 months ago

Oh, my bad, the issue was because I use a custom model for the Wallet, instead of Bavix\Wallet\Models\Wallet I use my own Wallet model that extends Bavix\Wallet\Models\Wallet, so I got this issue, I have no idea why though. but for now I''m going to close this issue. 🏃‍♂️