From c4cad87cbd6f8c7a84bf21338baad27fd980a65e Mon Sep 17 00:00:00 2001 From: George Klincarski Date: Tue, 23 Jan 2024 20:20:45 +0100 Subject: [PATCH] Revert MorphTo into BelongsTo Signed-off-by: George Klincarski --- src/Models/Transfer.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Models/Transfer.php b/src/Models/Transfer.php index aa13882a6..89f23444b 100644 --- a/src/Models/Transfer.php +++ b/src/Models/Transfer.php @@ -6,7 +6,6 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; -use Illuminate\Database\Eloquent\Relations\MorphTo; use function config; /** @@ -80,17 +79,17 @@ public function getTable(): string /** * @return BelongsTo */ - public function from(): MorphTo + public function from(): BelongsTo { - return $this->morphTo(); + return $this->belongsTo(config('wallet.wallet.model', Wallet::class), 'from_id'); } /** * @return BelongsTo */ - public function to(): MorphTo + public function to(): BelongsTo { - return $this->morphTo(); + return $this->belongsTo(config('wallet.wallet.model', Wallet::class), 'to_id'); } /**