lundi 24 août 2015

Divide Total Rows by Total of all rows - Laravel

I have a table which stores tips and inside this table is a row of odds.

I need to workout the average odds of all tips

e.g Average Odds = Sum of all odds / Number of Tips

However I cannot workout how to do this in my Controller on Laravel...

I can get total rows with $totaltips = Tip::count();



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1JvuHVo
via IFTTT

Aucun commentaire:

Enregistrer un commentaire