how to insert data to 2 tables i.e Employee and User(migrated) from single form(Employee Create) and controller in yii2
问题 this is my create page questions/create.php ` <?= $form->field($model, 'clinic_id')->dropDownList( ArrayHelper::map(Clinic::find()->all(),'id','clinic_name'), ['prompt'=> 'Select Clinic'] )?> <?= $form->field($model, 'first_name')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'last_name')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'user_name')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'password')->passwordInput(['maxlength' => true]) ?> <