attributes['type'] ?? ServerType::DOMAIN->value; return in_array($type, [ServerType::HOSTING->value, ServerType::BOTH->value], true); } public function publicHost(): string { return $this->domain ?: $this->ip_address; } public function panelUrl(): string { return 'https://' . $this->publicHost() . '/'; } protected function scopeIsActive($query) { return $query->where('status', 'activated'); } }