Esempio n. 1
0
 /**
  * Lists all Company models by a user.
  * modify actionIndex to limit a contact's view so it's safer?
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new CompanySearch();
     $dataProvider = $searchModel->searchCompanyByContact(Yii::$app->user->id);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
 /**
  * Lists all Company models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new CompanySearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }