Added documentation for the touch() function

Signed-off-by: Callum McIntyre <mcintyre1994@gmail.com>
This commit is contained in:
Callum McIntyre 2012-09-03 22:23:58 +01:00
parent 6b73974505
commit 0161273010
1 changed files with 5 additions and 0 deletions

View File

@ -132,6 +132,11 @@ ## Inserting & Updating Models
Next, add **created_at** and **updated_at** date columns to your table. Now, whenever you save the model, the creation and update timestamps will be set automatically. You're welcome.
In some cases it may be useful to update the **updated_at** date column without actually modifying any data within the model. Simply use the **touch** method, which will also automatically save the changes immediately:
$comment = Comment::find(1);
$comment->touch();
> **Note:** You can change the default timezone of your application in the **application/config/application.php** file.
<a name="relationships"></a>