diff --git a/app/Services/CommonService.php b/app/Services/CommonService.php index f23c213..e4be18c 100644 --- a/app/Services/CommonService.php +++ b/app/Services/CommonService.php @@ -134,6 +134,8 @@ abstract class CommonService //생성용 protected function create_process(array $formDatas): CommonEntity { + //PrimaryKey 필드는 생성에서 제외 + unset($formDatas[$this->model->primaryKey]); $result = $this->model->insert($formDatas, $this->model->useAutoIncrement()); if ($result === false) { $errors = $this->model->errors();