validate([ 'member_id' => ['required', 'string'], 'visitor_id' => ['required', 'string'], ]); PublicService:: setVisitorId($params['member_id'], $params['visitor_id']); } catch (ValidationException $e) { return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first()); } catch (Exception $e) { return $this->error(HttpStatus::CUSTOM_ERROR, $e->getMessage()); } return $this->success(); } }