예제 #1
0
 /**
  * Lists all Stock models.
  * @return mixed
  */
 public function actionIndex()
 {
     //$dataProvider = new ActiveDataProvider([
     //    'query' => Stock::find(),
     //]);
     $dataProvider = Stock::find()->where(['on' => 1])->all();
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
예제 #2
0
 /**
  * Lists all Stock models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => Stock::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }