Skip to content

Commit

Permalink
Add method
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed May 8, 2023
1 parent cc2c80b commit 8e2e711
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ public function active(): bool
return $this->status === self::STATUS_ACTIVE;
}

/**
* Determine if the subscription's trial has expired.
*/
public function hasExpiredTrial(): bool
{
return $this->trial_ends_at && $this->trial_ends_at->isPast();
}

/**
* Filter query by active.
*/
Expand Down

0 comments on commit 8e2e711

Please sign in to comment.