Push an item onto the beginning of the collection.

@param mixed $value
@param mixed $key

@return $this
431142
public function prepend($value, $key = null): Collection
    {
        $this->items = Arr::prepend($this->items, $value, $key);

        return $this;
    }
270561
public function set($key, $value)
    {
        if (method_exists($this, 'validate' . ucfirst($key))) {
            $value = call_user_func([$this, 'validate' . ucfirst($key)], $value);
        }

        $this->checkKeyExistInDefault($key);

        $this->data[$key] = $value;

        return $this;
    }
953477
public function push($key, $value)
    {
        $config = $this->get($key);

        $this->setSingleItem($key, \array_push($config, $value));
    }
881068
public function setPayloadClaim(string $key, $value): self
    {
        $this->payload[$key] = $value;

        return $this;
    }
429846
public function set($key, $value = null)
    {
        if( is_array($key) ) {
            $this->values($key);
        } else {
            $this->value($key, $value);
        }
        return $this;
    }
280653
public function add($key, $value)
    {
        if (! is_null($key)) {
            $currentValue = Arr::get($this->payload, $key, []);

            if (! is_array($currentValue)) {
                $currentValue = Arr::wrap($currentValue);
            }

            $currentValue[] = $value;

            Arr::set($this->payload, $key, $currentValue);
        }

        return $this;
    }
146365
public function attachPayload($key, $value)
    {
        if (is_null($this->payload)) {
            $this->payload = [];
        }

        $this->payload[$key] = $value;

        return $this;
    }
418009
public function put($key, $value = '')
    {
        Arr::set($this->attributes, $key, $value);

        return $this;
    }
861634
public function set($key, $value)
    {
        $this->checkRestriction($value);

        if (!is_null($key)) {
            $this->value[$key] = $value;
        } else {
            $this->value[] = $value;
        }

        return $this;
    }
470713
public function set( $key, $value ) {
		$key = $this->addKeyprefixIfNeeded( $key );
		$this->params[$key] = $value;
		return $this;
	}
784098
public function push($key, $value = null)
    {
        if (is_null($value)) {
            $this->items[] = $key;

            return;
        }

        $items = $this->get($key);

        if (is_array($items) || is_null($items)) {
            $items[] = $value;
            $this->set($key, $items);
        }
    }
1031573
public function set($key, $value=null)
    {
        if (is_array($key)) {
            $this->data = array_merge($this->data, $key);
        } elseif ($key instanceof Collection) {
            $this->set($key->all());
        } elseif (is_scalar($key)) {
            $this->data[$key] = $value;
        }
        
        return $this;
    }
1249783
public function push($value, $key = null)
    {
        if ($key == null) {
            $this->storage[] = $value;
        } else {
            $this->storage[$key] = $value;
        }

        return $this;
    }
1126362
public function value($key, $value)
    {
        $this->values = array_merge($this->values ?? [], [$this->trimName($key) => $value]);
        return $this;
    }
1106261
public function set($key, $value = null)
    {
        if (!$this->offsetExists($key)) {
            $this->storage[$key] = $value;
        }

        return $this;
    }
1101250
public function pluck($value, $key = null)
    {
        return with(new static(Arr::pluck($this->items, $value, $key)))->first();
    }
22339
public function push($key, $value)
    {
        $array = $this->get($key, []);

        if(!is_array($array))
            throw new JsonPropertyException('Cannot push value to non array');

        array_push($array, $value);

        return $this->set($key, $array);
    }