getSubnet(); /** @var Client $clientEntity */ $data = [ 'hostname' => $client->getName(), 'oldMacAddress' => strtolower($mac), 'macAddress' => strtolower($client->getMac()), 'address' => $client->getIp(), ]; $params = [ 'json' => $data ]; $content = $this->createRequest('PUT', 'http://'.$this->ogDhcpApiUrl.'/ogdhcp/v1/subnets/'.$subnet->getServerId().'/hosts', $params); return new JsonResponse(status: Response::HTTP_OK); } }