harishdurga / laravel-quiz

With this package, you can easily get quiz functionality into your Laravel project.
MIT License
162 stars 19 forks source link

How topicables relate to Questions #44

Closed calebnanigah closed 8 months ago

calebnanigah commented 8 months ago

When topics are attached to a question, the topic_ids are created in the topicables table.

However, I do not see any relation between the topics and the questions.

How is topicables table related to the questions table?

harishdurga commented 8 months ago

Basically we attach topics to questions like tags or categories so that it is easy to fetch questions of a specific category.

calebnanigah commented 8 months ago

@harishdurga , thank you for your response.

After creating quizzes and questions with attached topics, I observed how topicables work: when a quiz is created, topicable_id is the ID of the quiz, when a question is created topicable_id, is the ID/IDs of the questions (attached topics in both cases)