Concat - maximiliamus/weby-sloth GitHub Wiki

Concatenates the values of a column. The non-array values are converted to string and concatenated into the resulting string. The array values are merged into the resulting array.

During concatenation the boolean values are converted to '1' for true and '0' for false values.

$sloth = Sloth::from($data)
    ->group('foo', 'baz')
    ->concat();
$sloth->print();
foo     baz
one     123
two     4567
print_r($sloth->fetch());
Array
(
    [0] => Array
    (
        [foo] => one
        [baz] => 123
    )
    [1] => Array
    (
        [foo] => two
        [baz] => 4567
    )
)
⚠️ **GitHub.com Fallback** ⚠️