Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Add ability to disable touching of related model when toggling relation #15263

Merged
merged 1 commit into from
Sep 9, 2016
Merged

[5.3] Add ability to disable touching of related model when toggling relation #15263

merged 1 commit into from
Sep 9, 2016

Conversation

Anahkiasen
Copy link
Contributor

Currently when toggling a relation on a model, the related model gets automatically touched. However, in a lot of cases this may not be desirable. Per example in the case of a user being able to like articles, you wouldn't want to change the article's update date whenever an user likes it.

This PR adds a second facultative argument to toggle allowing to change that. This is a minor non-breaking change so I targeted 5.3.

@taylorotwell taylorotwell merged commit d1d6e3a into laravel:5.3 Sep 9, 2016
@Anahkiasen Anahkiasen deleted the feature/toggle-touching branch September 9, 2016 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants