DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PHP
Laravel Eloquent sum of multiplied columns
$amount = Transaction::all()->sum(function($t){ return $t->jumlah * $t->harga; });
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#Laravel
#Eloquent
#sum
#multiplied
#columns
ADD COMMENT
Topic
COMMENT
Name
2+2 =
Submit