feat(subscription): implement effective plan logic and update free plan features

This commit is contained in:
hamed
2026-07-05 10:46:31 +03:30
parent f3ca6d844f
commit 828e3552c0
10 changed files with 148 additions and 30 deletions
+2 -2
View File
@@ -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;