I'm beginner in YII. I want ask, I have two model with diferent table and no relation. example. Model User and Model Product. so in User Controller my code is
public function actionIndex() {
$model= new Product;
$dataProvider=new CActiveDataProvider('User');
$this->render('index',array(
'dataProvider'=>$dataProvider,
));
$this->renderPartial('application.views.Product.view',array('model'=>$model));
}
But the record can't show, just attribute.
so, I can show user record and product record in one page. In CI I wrote
$data['user']= $this->user->record();
$data['product']=$this->product->record();
$this->load->view('index',$data)
so, my question. how should I write to render multiple model with multiple table and without relation each other in one page in yii?