sum() public method

Retrieve the sum of the values of a given column.
public sum ( string $column ) : mixed
$column string
return mixed
Exemplo n.º 1
0
 /**
  * Retrieve the sum of the values of a given column.
  *
  * @param string $column
  * @return float|int 
  * @static 
  */
 public static function sum($column)
 {
     return \Illuminate\Database\Query\Builder::sum($column);
 }
 /**
  * Get the aggregate sum.
  *
  * @param  $column
  * @return int
  */
 public function sum($column)
 {
     return (new Decorator())->decorate($this->query->sum($column));
 }