I’m currently creating an app where users have the possibility to create questions for everyone to answer and then users can answer those questions and the app keeps track of those answers for every single user.
So I have 2 tables “questions” and “answers”.
The creating of a question already works, but now I’m kind of stuck at displaying only one question at a time for a user, which he hasn’t answered yet and then display the next question he hasn’t answered yet.
I hope someone can explain to me how to only show one table record at a time, and then efficiently keep track which of those questions have been answered yet.
Thanks
I think you have the following models:
Then in your controller, you can have the following