All the functionality is working as it should. Just forgot to use eloquents save function at the end. Rating a quiz is fully working now.