Appends fresh related model if total count is not exceeding limit.

@param $key

@return $this
770621
protected function addOrGetRelated($key)
    {
        $related = $this->relatedValues->get($key) ?? $this->getFreshModelForElements();

        if (! $related->exists && ! $this->exceedsLimit()) {
            $this->relatedValues->put($key, $related);
        }

        return $related;
    }
1138533
protected function addResult($key, $increment = 1)
    {
        if (!array_key_exists($key, $this->results)) {
            $this->results[$key] = 0;
        }
        $this->results[$key] += $increment;
        return $this;
    }
1355128
public function forget(string $key)
    {
        $newContent = $this->all();

        unset($newContent[$key]);

        $this->setContent($newContent);

        return $this;
    }
1335748
public function with($key, $value = '')
    {
        if (is_array($key)) {
            $this->appends = $key;
        } elseif (is_callable($value)) {
            $this->appends[$key] = value($value);
        } else {
            $this->appends[$key] = value($value);
        }

        return $this;
    }
444292
protected function setKey($key): self
    {
        assert(is_resource($key) === true);

        $this->closeKey();
        $this->key = $key;

        return $this;
    }
79763
public function alias($key) {
        if (count($this->from) == 1) {
            $this->from = array($key => current($this->from));
        }
        return $this;
    }
1243887
public function addItem($key, $item)
    {
        $dataset = $this->getDataset($key);

        // Get max value for the id
        $max = 0;
        foreach ($dataset as $val) {
            if ($max < $val["id"]) {
                $max = $val["id"];
            }
        }
        $item["id"] = $max + 1;
        $dataset[] = $item;
        $this->saveDataset($key, $dataset);
        return $item;
    }
1015118
public function addRelation($key, AbstractRelation $value)
    {
        $this->relations[$key][$value->getClass()] = $value;

        return $this;
    }
332514
public function group_by( $key ) 
	{
		if ( !is_array( $key ) )
		{
			$key = array( $key );	
		}
		
		foreach( $key as $group_key )
		{
			$this->groups[] = $group_key;
		}
		
		return $this;
	}
450927
public function forget($key)
    {
        $this->checkLoaded();

        $this->unsaved = true;

        Arr::forget($this->data, $key);

        return $this;
    }
81592
public function addChild($key)
	{
		$object = new ArrayTargetBuilder();
		$this->data[$key] = [];
		$object->data = &$this->data[$key];
		
		return $object;
	}
844512
public function add($key)
    {
        $configuration = new AdminConfigurationGroup();

        $configuration->key($key);
        $this->configurations->put($key, $configuration);

        return $configuration;
    }
347567
public function setKey($key)
    {
        $arr = $this->parseKey($key);
        $this->key = $arr['key'];
        $this->identifier = $arr['identifier'];
        $this->prefix = $arr['prefix'];

        return $this;
    }
898271
public function remove($key)
    {
        if (false === $this->willRemove($key)) {
            $this->clearChange($key);
            if (true === $this->hasOriginal($key)) {
                $this->remove[] = $key;
            }
        }
        return $this;
    }
511262
protected function createChild($key)
    {
        $relation = $this->getValueOrRelationForKey($key);
        // if this is not a relation, then it's the actual value
        // returned by a method (like for example computed attributes)
        // so we just return it as the value

        if (!$relation instanceof Relation) {
            return $relation;
        }

        $this->supportedRelationOrThrow($key, $relation);

        // TODO we need to bind the relation to the datasource here
        $model = Rel::make($relation)->getChild();

        if (!$this->isEloquentObject($model)) {
            throw new \LogicException(sprintf(
                'newModelFromRelation should return an Eloquent Model/Collection, but returned a %s (parent: %s, key: %s, relation: %s)',
                get_type_class($model),
                get_type_class($this->getDelegatedStorage()), $key, get_type_class($relation)
            ));
        }

        return $model;
    }
796613
public function append(string $key, $value)
    {
        $this->content->put($key, $value);

        return $this;
    }
633015
public function capture_append( $key, $callback ) 
	{
		return $this->set( $key, $this->get( $key, '' ).CCStr::capture( $callback, $this ) );
	}