/** * Displays a single Catalog model. * @param integer $id * @return mixed */ public function actionView($id) { $model = $this->findModel($id); $dataProvider = new ActiveDataProvider(['query' => Item::find()->where(['catalogid' => $model->id])]); return $this->render('view', ['dataProvider' => $dataProvider, 'model' => $model]); }
/** * Lists all Item models. * @return mixed */ public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => Item::find()]); return $this->render('index', ['dataProvider' => $dataProvider]); }