Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel collection methods

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

$collection->each(function($item){
    return $item*$item;
});

// [1,4,9,16]
Source by www.parthpatel.net #
 
PREVIOUS NEXT
Tagged: #laravel #collection #methods
ADD COMMENT
Topic
Name
4+2 =