Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

find sum of each group in laravel

$sums = $detailed->mapWithKeys (function ($group, $key) { return [$key => $group->sum ('sales_price')]; });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #sum #group #laravel
ADD COMMENT
Topic
Name
2+7 =