Hi All,
I am trying to update each record inside database this way
$allUsers = Users::find([
'columns' => 'user_name'
]);
foreach ($allUsers as $user){
$this->tokenHash = $this->generateToken();
$this->token = $this->userName.'|'.$this->tokenHash;
$user->update([
'token' => $this->token,
'token_hash' => $this->tokenHash
]);
}
But, a fatal error happens when trying to update the records:
Fatal error: Uncaught Error: Call to undefined method Phalcon\Mvc\Model\Row::save()
Any ideas ?