orderService->addOnlineOrder($request->validated()); if (!is_int($orderMainId)) { return $this->response ->withHeader('Content-Type', 'application/text') ->withStatus(500) ->withBody(new SwooleStream($orderMainId)); } return $this->response ->withHeader('Content-Type', 'application/text') ->withStatus(200) ->withBody(new SwooleStream($orderMainId)); } }