Answers for "laravel collection pipe"

PHP
0

laravel collection pipe

$collection = collect([1, 2, 3]);

$piped = $collection->pipe(function ($collection) {
    return $collection->sum();
});

// 6
Posted by: Guest on July-24-2021

Browse Popular Code Answers by Language