Laravel Version
10.41.0
PHP Version
8.1.27
Database Driver & Version
No response
Description
BelongsToMany::touch() does not call Model::isIgnoringTouch() to check if the models should be touched, so Model::withoutTouching() is not working for Many-To-Many relations.
Steps To Reproduce
- Create two Models with Many-To-Many relation
- Add $touches variable to the models and add the other model
- Update one model by
Model::withoutTouching(fn() => $model1->update(['column' => '::newVallue::']))
- Check that both updated_at columns got updated