mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-27 22:40:38 +08:00
feat(coupon): enhance theme compatibility by converting plan IDs to strings
This commit is contained in:
@@ -23,4 +23,18 @@ class Coupon extends Model
|
|||||||
return PlanService::getPeriodKey($item);
|
return PlanService::getPeriodKey($item);
|
||||||
})->toArray();
|
})->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getLimitPlanIdsAttribute($value)
|
||||||
|
{
|
||||||
|
$planIds = json_decode($value, true);
|
||||||
|
|
||||||
|
if (blank($planIds)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return collect($planIds)
|
||||||
|
->map(fn($id) => (string) $id)
|
||||||
|
->values()
|
||||||
|
->all();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user