Skip to content

Commit db0014f

Browse files
authored
Merge pull request #858 from gkmk/patch-1
Update Transfer Model
2 parents 5f30995 + c4cad87 commit db0014f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Models/Transfer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,30 +81,30 @@ public function getTable(): string
8181
*/
8282
public function from(): BelongsTo
8383
{
84-
return $this->belongsTo(Wallet::class, 'from_id');
84+
return $this->belongsTo(config('wallet.wallet.model', Wallet::class), 'from_id');
8585
}
8686

8787
/**
8888
* @return BelongsTo<Wallet, self>
8989
*/
9090
public function to(): BelongsTo
9191
{
92-
return $this->belongsTo(Wallet::class, 'to_id');
92+
return $this->belongsTo(config('wallet.wallet.model', Wallet::class), 'to_id');
9393
}
9494

9595
/**
9696
* @return BelongsTo<Transaction, self>
9797
*/
9898
public function deposit(): BelongsTo
9999
{
100-
return $this->belongsTo(Transaction::class, 'deposit_id');
100+
return $this->belongsTo(config('wallet.transaction.model', Transaction::class), 'deposit_id');
101101
}
102102

103103
/**
104104
* @return BelongsTo<Transaction, self>
105105
*/
106106
public function withdraw(): BelongsTo
107107
{
108-
return $this->belongsTo(Transaction::class, 'withdraw_id');
108+
return $this->belongsTo(config('wallet.transaction.model', Transaction::class), 'withdraw_id');
109109
}
110110
}

0 commit comments

Comments
 (0)