{@inheritdoc}

@param array $attributes

@return self
325559
public function replicate(array $attributes = [])
    {
        if (!isset($attributes['query'])) {
            return new static(array_merge($this->toArray(), $attributes));
        }

        $queryAttributes = $attributes['query'];
        unset($attributes['query']);

        $newAttributes = array_merge($this->toArray(), $attributes);

        $newAttributes['query'] = $this->mergeOrReplaceQuery($queryAttributes);

        return new static($newAttributes);
    }
1259588
public function addAttributes(array $attributes)
    {
        foreach ($attributes as $attribute => $value) {
            $this->addAttribute($attribute, $value);
        }

        return $this;
    }
1086098
public function merge( array $attributes ) {
		foreach ( $attributes as $name => $value ) {
			$this->set_attribute( $name, $value );
		}

		return $this;
	}
65982
public function setAttributes(array $attributes = [])
    {
        $this->attributes = array_merge($this->attributes, $attributes);

        $this->validateAttributes();

        $this->decoupleOptionsFromAttributes();

        return $this;
    }
1096913
public function createElement(array $attributes)
    {
        $element = $this->ownerDocument->createElement($this->element);

        $name = null;
        foreach ($attributes as $key => $value) {
            $element->setAttribute($key, $value);
        }

        $this[] = $element;

        return $element;
    }
449297
public function setAttributes(array $attributes = [])
    {
        $this->attributes = array_merge($this->attributes, $attributes);
        isset($attributes['id']) ? $this->id         = $attributes['id'] : null;
        return $this;
    }
653230
public function add(array $attributes = array())
    {
        if (!$this->contains($attributes)) {
            $this->model->getModel()->newInstance($attributes)->save();
            $this->cache->forget($this->cacheKey);
        }
        return $this;
    }
827246
public function firstOrCreate( array $attributes )
	{
		if ( !is_null( $instance = $this->where( $attributes )->first() ) )
			return $instance;

		$instance = $this->model->newInstance( $attributes );

		$instance->save();

		return $instance;
	}
1258966
public static function firstOrCreate(array $attributes)
    {
        if (! is_null($instance = static::where($attributes)->first())) {
            return $instance;
        }

        return static::create($attributes);
    }
542741
public function setAttributes($attributes) {
		if (is_array($attributes) && empty($attributes)) {
			$this->attributes = new \stdClass;
		} else {
			$this->attributes = $attributes;
		}

		return $this;
	}
534545
public function replicate(array $attributes = [])
    {
        $groupPrefix = isset($attributes['groupPrefix']) ? $attributes['groupPrefix'] : '';

        return new static($this->parent, $this->namer, $this->groupName($groupPrefix));
    }
1325635
public function remove($attributes)
    {
        foreach ((array) $attributes as $attribute) {
            unset($this->defaults[$attribute],
                $this->types[$attribute],
                $this->requires[$attribute],
                $this->notNullables[$attribute]);
        }

        return $this;
    }
537209
public function attr(Array $attributes) : Table
    {
        foreach( $attributes as $att => $val )
        {
            $this->attr[$att] = $val;
        }

        return $this;
    }
20688
public function map(array $attributes)
    {
        foreach ($attributes as $key => $value) {
            $this->{$key} = $value;
        }

        return $this;
    }
393689
public function firstOrNew(array $attributes)
    {
        if (is_null($instance = $this->where($attributes)->first())) {
            $instance = $this->related->newInstance($attributes);

            $instance->setAttribute($this->getForeignKeyName(), $this->getParentKey());
        }

        return $instance;
    }
538652
public function attributes(array $attributes)
        {
            $this->attributes = array_replace($this->attributes, $this->markup->attributes($this->tag, $attributes));

            return $this;
        }
322662
public function removeAttribute(string $attribute): self
    {
        // Determine if the attribute is present, unset if present
        if (array_key_exists($attribute, $this->attributes)) {
            unset($this->attributes[$attribute]);
        }

        return $this;
    }