'integer', 'max_databases' => 'integer', ]; /** * Validation rules to assign to this model. * * @var array */ public static $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 a database host. * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function databases() { return $this->hasMany(Database::class); } /** * Gets the nodes associated with a database host. * * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function nodes() { return $this->belongsToMany(Node::class); } }