mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-02-09 18:38:14 -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);
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user