how to get the data in afterUpdate method ?

$robot = Robot::findFirst(1);
$data = ['name' => 'Tom'];
Class Robot extends  \Phalcon\Mvc\Model
   public function afterUpdate() {
           // how to get the updated data here ?

$data = ['name' => 'Tom'];

$data = ['name' => 'Tom', 'color' => 'white'];

the data array may be dynamic, so your method can not solve the problem


You should always set and know which columns can be in database as well you should add all properties to make everything working faster.