Skip to content

Commit 5a29f46

Browse files
keatliang2005rez1dent3
authored andcommitted
Fix laravel-ide-helper generate:model
#516
1 parent 3a9c2e8 commit 5a29f46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/HasWallet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function getBalanceIntAttribute(): int
8181
public function walletTransactions(): HasMany
8282
{
8383
return app(CastServiceInterface::class)
84-
->getWallet($this)
84+
->getWallet($this, !is_null($this->id))
8585
->hasMany(config('wallet.transaction.model', Transaction::class), 'wallet_id')
8686
;
8787
}

0 commit comments

Comments
 (0)