attributes['type'] ?? ServerType::DOMAIN->value; return in_array($type, [ServerType::HOSTING->value, ServerType::BOTH->value], true); } protected function scopeIsActive($query) { return $query->where('status', 'activated'); } }