Ejemplo n.º 1
0
 /**
  * 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);
 }
Ejemplo n.º 2
0
 /**
  * @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));
 }
Ejemplo n.º 3
0
 /**
  * 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));
 }