How can I update through a multimodel form in Yii?
If my create action is
public function actionCreate()
{
$model = new Model;
$model2 = new Model2;
$model3 = new Model3;
Normally in update action I will use
public function actionUpdate($id)
{
$model = $this->loadModel($id, 'Model');
But how to I handle the others models (Model2 and Model3). I want to be able to update all models at the same time.
Did you update your “loadModel” method to use different models, something like:
And use that for your update functions.