src/Traits/Collections.php
public static function concat($collection1, $collection2)
    {
        $isObject = __::isObject($collection1);

        $args = __::map(func_get_args(), function ($arg) {
            return (array)$arg;
        });

        $merged = call_user_func_array('array_merge', $args);

        return $isObject ? (object)$merged : $merged;
    }
public static function concat($collection1, $collection2)
    {
        $isObject = __::isObject($collection1);

        $args = __::map(func_get_args(), function ($arg) {
            return (array)$arg;
        });

        $merged = call_user_func_array('array_merge', $args);

        return $isObject ? (object)$merged : $merged;
    }
public static function concat ( $ collection1 , $ collection2 ) { $ isObject = __ :: isObject ( $ collection1 ) ; $ args = __ :: map ( func_get_args ( ) , function ( $ arg ) { return ( array ) $ arg ; } ) ; $ merged = call_user_func_array ( 'array_merge' , $ args ) ; return $ isObject ? ( object ) $ merged : $ merged ; }
Combines and concat collections provided with each others.

If the collections have common keys, then the values are appended in an array.
If numerical indexes are passed, then values are appended.

For a recursive merge, see __::merge.

@usage __::concat(['color' => ['favorite' => 'red', 5], 3], [10, 'color' => ['favorite' => 'green', 'blue']]);
>> ['color' => ['favorite' => ['green'], 5, 'blue'], 3, 10]

@param array|object $collection1 Collection to assign to.
@param array|object $collection2 Other collections to assign.

@return array|object Assigned collection.
Combines and concat collections provided with each others .