Back
afterFind()
Registers method(s) that should be called after an existing object has been initialized (which is usually done with the findByKey
or findOne
method).
// Instruct CFWheels to call the `setTime` method after getting objects or records with one of the finder methods. config() { afterFind("setTime"); } function setTime(){ arguments.fetchedAt = Now(); return arguments; }
Copied!