Commit c8ee7ca6 authored by Callum McIntyre's avatar Callum McIntyre

Added documentation regarding the newly public timestamp() function

Signed-off-by: 's avatarCallum McIntyre <mcintyre1994@gmail.com>
parent 01612730
...@@ -137,6 +137,13 @@ In some cases it may be useful to update the **updated_at** date column without ...@@ -137,6 +137,13 @@ In some cases it may be useful to update the **updated_at** date column without
$comment = Comment::find(1); $comment = Comment::find(1);
$comment->touch(); $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. > **Note:** You can change the default timezone of your application in the **application/config/application.php** file.
<a name="relationships"></a> <a name="relationships"></a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment