$slideId) { $slider->slides()->where('id', $slideId)->update(['sort' => $index + 1]); } } }