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