/** * Push an item onto the beginning of the collection. * * @param mixed $value * @param mixed $key * @return $this */ public function prepend($value, $key = null) { $this->items = Arr::prepend($this->items, $value, $key); return $this; }
/** * Push an item onto the beginning of an array. * * @param array $array * @param mixed $value * @param mixed $key * @return array */ function array_prepend($array, $value, $key = null) { return Arr::prepend($array, $value, $key); }