$result = Staff::update([
'name'=>'Takematsu',
],['id'=>1045]);
if ($result){ return $result->name.'Update successful';
}else{
return $result->getError();
}
WJ2020-05-20 16:39:22
Can you post the complete code? Or you can refer to https://www.php.cn/php/php-update-method.html