Esempio n. 1
0
 /**
  * Lists all Channel models.
  * @return mixed
  */
 public function actionIndex()
 {
     echo '<pre>';
     print_r(Yii::$app->request->queryParams);
     echo '</pre>';
     //die;
     $searchModel = new ChannelSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $dataProvider = Channel::checkChannelStatus($dataProvider);
     //$channels = $dataProvider->models;
     //ArrayHelper::multisort($channels, ['viewers'], [SORT_ASC]);
     //echo'<pre>';print_r($channels);echo'</pre>';die;
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }