Hello!
first of all, sorry for my English.
This is my first post in this forum. Please, any ideas are welcome because I am not an expert using PHP and Yii.
I would like to know if it is possible to send two equals models from the controller to the view and then get attributes using something like this.
MyController{
....
$a = new myModel();
$b = new myModel();
//please, notice that $a and $b are two objects with the same configuration.
if(isset($_POST['ATTRIBUTES FROM THE FIRST MODEL'])) //This line and the next if are my doubt
{
...
}
if(isset($_POST['ATTRIBUTES FROM THE SECOND MODEL']))
{
...
}
render('page', array(
'model_A' => $a,
'model_B' => $b, ))
...
}
thank you in advance!