Open elephantux opened 1 year ago
My solution:
$user->subscription()->changePlan($plan);
$user->subscription()->update([
'starts_at' => null,
'ends_at' => null
]);
$user->subscription()->renew();
But I don't think that's the right or best solution.
How do I change the plan for a user who already has an active plan and have the expiration dates updated based on the data from the new plan?
Everything is changing and updating with changePlan($plan) method except for the starts_at & ends_at dates.