/** * Fetch a flattened array of a nested array element. * * @param array $array * @param string $key * @return array */ function array_fetch($array, $key) { return Arr::fetch($array, $key); }
/** * @param string $key * @return static * @deprecated since version 5.1. Use pluck instead. */ public function fetch($key) { return new static(Arr::fetch($this->toArray(), $key)); }
/** * Fetch a nested element of the collection. * * @param string $key * @return static * * @deprecated since version 5.1. Use pluck instead. */ public function fetch($key) { return new static(Arr::fetch($this->items, $key)); }