Assume that I have a page user create ,I want to multi create user on single views ,It mean that when submit form ,multi instances of model will be sent to controller to do saving, how can I accomplish it with Yii2 anything like this
public function actionMultiCreate() {
if($request->isGet) {
$user = new User()
return $this->render("multi-create",['user' => $user])
} else {
//load array of user model and save it
}
}
and views :
....
User1: <$form->field($model,'user-name')>
User2: <$form->field($model,'user-name')>
......