Why total votes are returned as an absolute value?
gordanielyan opened this issue · 4 comments
For example if there are more downvotes shouldn't it return a negative value?
laravel-vote/src/Traits/Votable.php
Line 77 in 8573e50
@gordanielyan I don't think so, it means "How many users voted" or "How many votes were cast in total", not "upvotes - downvotes"
@overtrue but why is it sum then?
laravel-vote/src/Traits/Votable.php
Line 92 in 8573e50
if you have 3 downvotes and one upvote it returns 2, is it right result?
Sorry, I went through the source code again, you are right, this project has not been updated for too long, after just reading it carefully, I confirmed that the abs here should be redundant, it may be a problem caused by copying the code at first, I'll fix it, thanks again for your feedback.