mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-02-09 02:18:13 -05:00
feat(coupon): enhance theme compatibility by converting plan IDs to strings
Some checks failed
Docker Build and Publish / build (push) Has been cancelled
Some checks failed
Docker Build and Publish / build (push) Has been cancelled
This commit is contained in:
parent
caade5c791
commit
1ae8deca99
@ -23,4 +23,18 @@ class Coupon extends Model
|
||||
return PlanService::getPeriodKey($item);
|
||||
})->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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user