Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel collection tap

collect([2, 4, 3, 1, 5])
    ->sort()
    ->tap(function ($collection) {
        Log::debug('Values after sorting', $collection->values()->toArray());
    })
    ->shift();

// 1
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #collection #tap
ADD COMMENT
Topic
Name
6+8 =