src/Bag.php
public function defaults($collection)
    {
        return $this->createFrom(array_replace(Arr::from($collection), $this->items));
    }
public function defaults($collection)
    {
        return $this->createFrom(array_replace(Arr::from($collection), $this->items));
    }
Returns a bag with the items from the `$collection` added to the items in this bag
if they do not already exist by comparing keys. The opposite of {@see replace}.

Example:

Bag::from(['foo' => 'bar'])
->defaults(['foo' => 'other', 'hello' => 'world']);
// => Bag of ['foo' => 'bar', 'hello' => 'world']

@param iterable $collection The collection from which items will be extracted

@return static