Closed khanhnam99 closed 5 years ago
in my controller
$user = User::first(); $wallet = $user->createWallet([ 'name' => 'New Wallet', 'slug' => 'my-wallet', ]); $wallet->deposit(100);
exit;
$user = User::first(); $wallet = $user->createWallet([ 'name' => 'New Wallet', 'slug' => 'my-wallet', 'holder_type' => 'App\Models\User\User', ]); $wallet->deposit(100);
exit;
Can not reproduce. I'll try tomorrow.
the code is fine, this problem should not be https://github.com/bavix/laravel-wallet/blob/master/src/Models/Wallet.php#L34
@khanhnam99 I can not reproduce. I need your code: models, controller, etc. https://github.com/bavix/laravel-wallet/blob/master/tests/MultiWalletTest.php#L303
thanks
@khanhnam99 I studied the code carefully and kind of found a possible problem. I fixed it in version 3.1 and wrote unit tests. Release 3.1 will be released within an hour.
@khanhnam99 Version 3.1 has been released. Please check this error.
How do I assign a new empty wallet to every newly registered users and manually allow deposit from a credit and sending to another user manually?
ex: slug have a name 'coin' , or 'bit'
how insert slug, name in table wallets $user = User::first();