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');


via Chebli Mohamed

1 commentaire:

  1. If you're trying hard to lose kilograms then you need to start following this brand new tailor-made keto meal plan.

    To produce this keto diet, licensed nutritionists, fitness trainers, and professional chefs have joined together to develop keto meal plans that are efficient, convenient, economically-efficient, and enjoyable.

    Since their grand opening in January 2019, 1000's of clients have already transformed their body and well-being with the benefits a great keto meal plan can give.

    Speaking of benefits: clicking this link, you'll discover eight scientifically-tested ones offered by the keto meal plan.

    RépondreSupprimer