Skip to content

Commit

Permalink
main: add commission belongs to relation to `CommissionCalculateHis…
Browse files Browse the repository at this point in the history
…tory` model
  • Loading branch information
mkeremcansev committed Oct 3, 2024
1 parent a93544b commit 514bb2a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Models/CommissionCalculateHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -34,4 +35,9 @@ protected function casts(): array
'reason' => CommissionCalculateHistoryReasonEnum::class,
];
}

public function commission(): BelongsTo
{
return $this->belongsTo(Commission::class);
}
}

0 comments on commit 514bb2a

Please sign in to comment.