Thursday, February 23, 2012

Re: Saving a field with every operation in controllers

Depends what you mean by "make an action." Do you want to modify the timestamp each time they modify the database, or do you want to modify the timestamp each time they call an action, like /controller/action?

If it's the first, then use a behavior. There are a few "logging" behaviors out there that will do this for you (i.e., This user modified this model id on this date).

If it's the second, then a simple beforeFilter on AppController will suffice.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate