public function update(Entity $entity) { $state = ['updated' => time()]; if ($entity->hasChanged('password')) { $state['password'] = $this->hasher->hash($entity->password); } return parent::update($entity->setState($state)); }
public function update(Entity $entity) { $state = ['updated' => time()]; return parent::update($entity->setState($state)); }
public function update(Entity $entity) { return parent::update($entity->setState(['updated' => time()])); }