Plans and consumption for the same plan but diferent PeriodicityType
pixsolution opened this issue · 3 comments
Hello! I'm reading your doc to create plans https://github.com/lucasdotvin/laravel-soulbscription?ref=madewithlaravel.com#creating-plans and you give an example to create a monthly plan, but what happens if the same plan has Quarterly and Annual PeriodicityType? how would I do it in that case?
$gold = Plan::create([
'name' => 'gold',
'periodicity_type' => PeriodicityType::Month,
'periodicity' => 1,
]);
$gold = Plan::create([
'name' => 'gold',
'periodicity_type' => PeriodicityType::Month,
'periodicity' => 3,
]);
$gold = Plan::create([
'name' => 'gold',
'periodicity_type' => PeriodicityType::Month,
'periodicity' => 12,
]);
`
it would be like this?
And how would it work the consumption of features be in those cases?
Regards
@pixsolution I think the natural solution would be to treat them as separate plans. For example, plan-a-monthly
and plan-a-yearly
.
Hey! I believe @frknasir already provided an answer with the most proper way to work in this scenario.
Hey! I believe @frknasir already provided an answer with the most proper way to work in this scenario.
you did provide this in the docs :
$subscriber->subscribeTo($plan, expiration: today()->addYear());
So I wanted to know if using a monthly plan while setting the expiry to be after a year would work.