public function actionAllproducts() { $this->layout = "@app/views/layouts/vendor_left"; $searchModel = new VendorSearch(); $params = ['vendorId' => Yii::$app->user->id]; $dataProvider = $searchModel->search($params); return $this->render('allProducts', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
/** * Lists all Vendorproducts models. * * @return mixed */ public function actionIndex() { $searchModel = new VendorSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }