/**
  * Get a flattened array of the items in the collection.
  *
  * @param  int  $depth
  * @return static
  */
 public function flatten($depth = INF)
 {
     return new static(Arr::flatten($this->items, $depth));
 }
Example #2
0
 /**
  * Flatten a multi-dimensional array into a single level.
  *
  * @param  array  $array
  * @param  int  $depth
  * @return array
  */
 function array_flatten($array, $depth = INF)
 {
     return Arr::flatten($array, $depth);
 }