diff --git a/.gitignore b/.gitignore index 5298e38..647514c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /vendor /.phpintel -composer.phar \ No newline at end of file +composer.phar +/.idea \ No newline at end of file diff --git a/src/LaraPlans/Models/PlanSubscription.php b/src/LaraPlans/Models/PlanSubscription.php index b625078..c8aa01a 100644 --- a/src/LaraPlans/Models/PlanSubscription.php +++ b/src/LaraPlans/Models/PlanSubscription.php @@ -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. @@ -113,6 +114,10 @@ public function getStatusAttribute() if ($this->canceled()) { return self::STATUS_CANCELED; } + + if ($this->ended()) { + return self::STATUS_ENDED; + } } /**