Exclude rows from reordering completely

I'm working on a Laravel application where I have a many-to-many relationship between Campaign and Question models through a campaign_question pivot table. Each question associated with a campaign has an order (a number) that determines its position. However, I have two types of questions: Main Questions: These should be assigned an order and appear in a specific sequence. Follow-up Questions: These are related to a main question and should not be ordered, meaning their order column can be null. My goal is to exclude follow-up questions from being reordered when I am updating the sequence of questions in the campaign. Only the main questions should participate in the reordering process. Current Setup: The campaign_question pivot table includes an order column that tracks the order of questions in a campaign. Follow-up questions are identified by a boolean field is_follow_up in the questions table. I was wondering if it's possible to make the reorder conditional ?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server