bavix / laravel-wallet

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

hello i found this error in new version #806

Closed asoltec closed 11 months ago

asoltec commented 11 months ago

when try to deposit i found this issue

Transaction failed. Message: in_array(): Argument #2 ($haystack) must be of type array, null given

rez1dent3 commented 11 months ago

Hello. This is an error in your code. Attach the code where you have a problem, I will try to help you.

https://github.com/bavix/laravel-wallet/blob/18448234e9af73fdf31bd9a5ca9a26fd34e56eca/src/Internal/Service/DatabaseService.php#L48

asoltec commented 11 months ago

use Bavix\Wallet\Traits\HasWallet; use Bavix\Wallet\Interfaces\Wallet;

class User extends Authenticatable implements HasMedia, Wallet { use HasWallet; } $user = User::find(1)->deposit( 100 ); dd($user->balance);

this is my code it's very simple and it was working before 2 month ago , this error happened when i update my packages

this error gone if i use version 8

asoltec commented 11 months ago

i solved it sorry for that the problem was in Listener