feat(subscription): implement effective plan logic and update free plan features
This commit is contained in:
@@ -90,10 +90,10 @@ class SubscriptionPlan
|
||||
];
|
||||
|
||||
if ($withPeriods) {
|
||||
$data['periods'] = array_map(
|
||||
$data['periods'] = array_values(array_map(
|
||||
fn(SubscriptionPeriod $p) => $p->toArray(),
|
||||
$this->periods->filter(fn(SubscriptionPeriod $p) => $p->isActive())->toArray()
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
Reference in New Issue
Block a user