V
V
Vitaly Liber2015-04-09 09:33:35
Yii
Vitaly Liber, 2015-04-09 09:33:35

How to set Yii2 to automatically save date_create and last_status_change in a form?

There is a feedback form. There are date_create and last_status_change fields. How to make form creation data and form changes automatically saved?
It looks like this. A person visits the page with the form and writes a review. Presses the send button. At this time, something happens in the model and the values ​​\u200b\u200bof the date of creation and the last modification are written to my database.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander N++, 2015-04-09
@VitalyLiber

https://github.com/yiisoft/yii2/blob/master/docs/g...
Using TimestampBehavior.

E
eldar_web, 2015-04-09
@eldar_web

The question is not accurate.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question