entity = $entity; } public function getEntity() { return $this->entity; } public function setEntity($entity) { $this->entity = $entity; } public function getValue($attr) { $arr = $this->entity->getChangeLoggedAttributes(); if(array_key_exists($attr, $arr) && $arr[$attr] instanceof \Closure) { return $arr[$attr]($this->entity); } return $this->entity->$attr; } }