Skip to content

Commit

Permalink
Update PlanSubscription.php
Browse files Browse the repository at this point in the history
Add "ended" subscription status to PlanSubscription.
  • Loading branch information
Acen committed Jul 31, 2017
1 parent 6be016d commit 7ffc5c5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/LaraPlans/Models/PlanSubscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ class PlanSubscription extends Model implements PlanSubscriptionInterface
/**
* Subscription statuses
*/
const STATUS_ACTIVE = 'active';
const STATUS_CANCELED = 'canceled';
const STATUS_ENDED = 'ended';
const STATUS_ACTIVE = 'active';
const STATUS_CANCELED = 'canceled';

/**
* The attributes that are mass assignable.
Expand Down Expand Up @@ -113,6 +114,10 @@ public function getStatusAttribute()
if ($this->canceled()) {
return self::STATUS_CANCELED;
}

if ($this->ended()) {
return self::STATUS_ENDED;
}
}

/**
Expand Down

0 comments on commit 7ffc5c5

Please sign in to comment.