Skip to content

[9.x] Make HasTimestamps::updateTimestamps chainable#42533

Merged
taylorotwell merged 2 commits intolaravel:9.xfrom
leandro-hermes:leandro-hermes-patch-1
May 26, 2022
Merged

[9.x] Make HasTimestamps::updateTimestamps chainable#42533
taylorotwell merged 2 commits intolaravel:9.xfrom
leandro-hermes:leandro-hermes-patch-1

Conversation

@leandro-hermes
Copy link
Contributor

@leandro-hermes leandro-hermes commented May 26, 2022

This PR makes the method HasTimestamps::updateTimestamps chainable, so we can do:

$model->updateTimestamps()->save();

@taylorotwell taylorotwell merged commit 6999399 into laravel:9.x May 26, 2022
@taylorotwell
Copy link
Member

Don't mind merging this, but for your example you can just do $model->touch()

@leandro-hermes leandro-hermes deleted the leandro-hermes-patch-1 branch May 26, 2022 17:46
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