I have created SiblingStudent model and pivot table with student_id and sibling_id. If I am creating student with id 2, and adding student 1 as sibling. so is it necessacry to add both id 1 & 2 in both student_id and sibling_id columns?
Aug 4, 2021
1
Level 2
Structuring siblings relation on same model
I have student model. I want to add siblings from existing students table on user profile page. I am selecting sibling from a dropdown.
Also I want to add the parents of old student(sibling) to the new student(sibling).
For student parent I have many-to-many relationship and I am saving student_id and parent_id in pivot table
How can I structure and add this sibling part?
Please or to participate in this conversation.