diff --git a/src/Models/CommissionCalculateHistory.php b/src/Models/CommissionCalculateHistory.php index 1b4c8f1..cc97e20 100644 --- a/src/Models/CommissionCalculateHistory.php +++ b/src/Models/CommissionCalculateHistory.php @@ -4,6 +4,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Mkeremcansev\LaravelCommission\Enums\CommissionCalculateHistoryReasonEnum; use Mkeremcansev\LaravelCommission\Enums\CommissionCalculateHistoryStatusEnum; @@ -34,4 +35,9 @@ protected function casts(): array 'reason' => CommissionCalculateHistoryReasonEnum::class, ]; } + + public function commission(): BelongsTo + { + return $this->belongsTo(Commission::class); + } }