DETAIL: Failing row contains (13, null, null, null, null).
The SQL being executed was: INSERT INTO "loyality_program" DEFAULT VALUES RETURNING "id"
такая ошибка возникает в момент сохранения, поля пусты..
Код
Код: Выделить всё
public function save($runValidation = true, $attributeNames = null){
\Yii::$app->db->createCommand("Insert into loyality_program (image, link, video, text) VALUES (:image, :link, :video, :text);",
[
":image" => $this->image,
":link" => $this->link,
":video" => $this->video,
":text" => $this->text,
])->execute();