Laravel-rating icon indicating copy to clipboard operation
Laravel-rating copied to clipboard

Currently ratingsAvg() was taking likes & dislikes into consideration

Open Guillermo-Blackspot opened this issue 3 years ago • 0 comments

Currently ratingsAvg() was taking likes & dislikes into consideration when calculating the average rating for a specific model which is wrong.

I had to change it manually and I think I have to do the same with the votes. you need to add the where clause and also return the result of avg with two decimal places

image image

Guillermo-Blackspot avatar Oct 07 '21 18:10 Guillermo-Blackspot