'integer', 'max_databases' => 'integer', ]; /** * Validation rules to assign to this model. */ public static array $validationRules = [ 'name' => 'required|string|max:191', 'host' => 'required|string', 'port' => 'required|numeric|between:1,65535', 'username' => 'required|string|max:32', 'password' => 'nullable|string', ]; /** * Gets the databases associated with this host. */ public function databases(): HasMany { return $this->hasMany(Database::class); } /** * Returns the nodes that a database host is assigned to. */ public function nodes(): BelongsToMany { return $this->belongsToMany(Node::class); } }