feat: 添加工作流

This commit is contained in:
kuaifan
2022-01-08 17:24:48 +08:00
parent 8a2571f514
commit bbd394272f
17 changed files with 1330 additions and 3 deletions
+5 -1
View File
@@ -140,7 +140,11 @@ class AbstractModel extends Model
$row = static::where($where)->first();
if (empty($row)) {
$row = new static;
$row->updateInstance(array_merge($where, $insert ?: $update));
$array = array_merge($where, $insert ?: $update);
if (isset($array[$row->primaryKey])) {
unset($array[$row->primaryKey]);
}
$row->updateInstance($array);
} elseif ($update) {
$row->updateInstance($update);
}