Laravel 5 Collections: Reducing a Multi-Dimensional Collection to a Single Dimension Losing Keys With flatten
The flatten method will return a new Collection instance representing a flattened version of the original collection's items. The flatten method internally makes use of the "Illuminate\Support\Arr::flatten($array)" helper method. The flatten...