Closed samtoya closed 4 years ago
I've added two new Eloquent scopes for excluding canceled subscriptions:
Gerardojbaez\Laraplans\Models\PlanSubscription::scopeExcludeCanceled
Gerardojbaez\Laraplans\Models\PlanSubscription::scopeExcludeImmediatelyCanceled
Using findEndingPeriod($days)->excludeCanceled()
or findEndingPeriod($days)->excludeImmediatelyCanceled()
should do the trick.
/**
@return \Illuminate\Database\Eloquent\Builder */ public function scopeFindEndingPeriod($query, $dayRange = 3) { $from = Carbon::now(); $to = Carbon::now()->addDays($dayRange);
}
Potential Fix: -->
public function scopeFindEndingPeriod($query, $dayRange = 3) { $from = Carbon::now(); $to = Carbon::now()->addDays($dayRange);