How to use model object in Yii Controller and View
问题 I have following method: public function actionIndex() { $companyModel = Company::model()->findAll(); $supplierProductModel = SupplierProduct::model()->findAll(); $this->render('index', array( 'companyData' => $companyModel, 'supplierProductData' => $supplierProductModel, )); } Here I have passed model objects to render function and want to access these objects in view (Active Relational Type) but when I am accessing its in view its showing error: Trying to get property of non-object view