/** * Lists all Files models. * @return mixed */ public function actionIndex() { $searchModel = new FilesSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); $dataProvider->query->andFilterWhere(['user_id' => Yii::$app->user->getId()]); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
public function actionFiles() { $searchModel = new FilesSearch(); $searchModel->visable_type = 1; $searchModel->user_id = Yii::$app->user->getId(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('files', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
/** * Lists all Files models. * @return mixed */ public function actionIndex() { $searchModel = new FilesSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }