From c8ee7ca6148942be2ccff7e26518721425f80247 Mon Sep 17 00:00:00 2001 From: Callum McIntyre Date: Mon, 3 Sep 2012 23:23:36 +0100 Subject: [PATCH] Added documentation regarding the newly public timestamp() function Signed-off-by: Callum McIntyre --- laravel/documentation/database/eloquent.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/laravel/documentation/database/eloquent.md b/laravel/documentation/database/eloquent.md index 45969c79..09493db0 100644 --- a/laravel/documentation/database/eloquent.md +++ b/laravel/documentation/database/eloquent.md @@ -137,6 +137,13 @@ ## Inserting & Updating Models $comment = Comment::find(1); $comment->touch(); +You can also use the **timestamp** function to update the **updated_at** date column without saving the model immediately. Note that if you are actually modifying the model's data this is handled behind the scenes: + + $comment = Comment::find(1); + $comment->timestamp(); + //do something else here, but not modifying the $comment model data + $comment->save(); + > **Note:** You can change the default timezone of your application in the **application/config/application.php** file.