getBuilder()->whereIn('id', $ids)->update(['server_id' => $server]); } /** * Return all of the allocations for a specific node. * * @param int $node * @return \Illuminate\Support\Collection */ public function getAllocationsForNode(int $node): Collection { return $this->getBuilder()->where('node_id', $node)->get($this->getColumns()); } /** * Return all of the unique IPs that exist for a given node. * * @param int $node * @return \Illuminate\Support\Collection */ public function getUniqueAllocationIpsForNode(int $node): Collection { return $this->getBuilder()->where('node_id', $node) ->groupBy('ip') ->orderByRaw('INET_ATON(ip) ASC') ->get($this->getColumns()); } }