public function beforeUpdate($event) { foreach ($this->update as $field) { $event->sender->{$field} = time(); } }