vendredi 6 mars 2020

How can i sum an array like this in laravel

I have this returned from two rows in my table, and i want to be able to display the sum in laravel blade.

["212,703.00","212,703.00"]

I have tried, but not working.. the name of the column is amount

 $investamount = DB::table('investment')->get();
 return $investamount->sum('amount');


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/32VnVqp
via IFTTT

Aucun commentaire:

Enregistrer un commentaire