I have also came up with approach when I am deleting all records (all steps) and inserting them:
if ($this->recipeId != 0) { GuideStep::where('recipe_id', $recipeId)->delete(); } GuideStep::insert($groupedSteps);
What do you think?