Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel collection mode

$mode = collect([['foo' => 10], ['foo' => 10], ['foo' => 20], ['foo' => 40]])->mode('foo');

// [10]

$mode = collect([1, 1, 2, 4])->mode();

// [1]
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #collection #mode
ADD COMMENT
Topic
Name
5+7 =