diff --git a/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php b/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php index 9f798b0c1cd1..2b6dfab6548e 100644 --- a/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php +++ b/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php @@ -43,6 +43,17 @@ public function touch($attribute = null) return $this->save(); } + /** + * Update the model's update timestamp without raising any events. + * + * @param string|null $attribute + * @return bool + */ + public function touchQuietly($attribute = null) + { + return static::withoutEvents(fn () => $this->touch($attribute)); + } + /** * Update the creation and update timestamps. *