Added two more queries to my database inside the rateQuiz function of laravel. Now as soon as a rating gets added for this quiz, I query to see how many people have rated this quiz, and get the average rating. I then round this rating to the closest 0, and update the Quizzes table with the new rating.