Skip to content

Commit 9ee55b5

Browse files
committed
feat: Update grace days when renewing
1 parent 63567d9 commit 9ee55b5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Models/Subscription.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public function renew(?Carbon $expirationDate = null): self
113113

114114
$this->update([
115115
'expired_at' => $expirationDate,
116+
'grace_days_ended_at' => $expirationDate->addDays($this->plan->grace_days),
116117
]);
117118

118119
event(new SubscriptionRenewed($this));

0 commit comments

Comments
 (0)