Ejemplo n.º 1
0
 public function actionIndex()
 {
     /* $sources = Source::find()->orderBy('id DESC');
             $dataProvider = new ActiveDataProvider([
                 'query' => $sources,
             ]);
     
             return $this->render('index', ['sources' => $dataProvider]);
            */
     $searchModel = new SourceSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['sources' => $dataProvider, 'searchModel' => $searchModel]);
 }
Ejemplo n.º 2
0
 /**
  * Lists all Source models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new SourceSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }