Set an array item to a given value using "dot" notation.

/**
 * Set an array item to a given value using "dot" notation.
 *
 * If no key is given to the method, the entire array will be replaced.
 *
 * @param  string $key   Key
 * @param  mixed  $value Value
 */
public function set(string $key, $value): self

Examples

$arrays = Arrays::create()->set('movies.the-thin-red-line.title', 'The Thin Red Line');

Getting Started

Methods