attributes['recharge_type'] = is_array($value) ? implode(',', $value) : $value; } public function getWithdrawTypeAttribute($value) { return $value ? explode(',', $value) : []; } public function setWithdrawAttribute($value) { $this->attributes['withdraw_type'] = is_array($value) ? implode(',', $value) : $value; } public function getActivityTypeAttribute($value) { return $value ? explode(',', $value) : []; } public function setActivityAttribute($value) { if (!$value) return ''; $this->attributes['activity_type'] = is_array($value) ? implode(',', $value) : $value; } }