loadMissing('server'); $server = $model->server ?? throw new UnexpectedValueException('The allocation does not belong to a server.'); return [ 'id' => $model->id, 'ip' => $model->ip, 'ip_alias' => $model->ip_alias, 'port' => $model->port, 'notes' => $model->notes, 'is_default' => $server->allocation_id === $model->id, ]; } }