I have form with two input fields like name,userid and the table columns are id(autoincrement,name,userid). If i save a record, the auto increment value of id will save in a column of userid. I have used a trigger for this, But this is not suitable because i'm using more than 10 table, So i need to write trigger for all the table.
So suggest me how to do this in yii2 model without write trigger.