Ejemplo n.º 1
0
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => Banners::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
Ejemplo n.º 2
0
 /**
  * Displays homepage.
  *
  * @return mixed
  */
 public function actionIndex()
 {
     $products = Product::find()->active()->all();
     return $this->render('index', ['products' => $products, 'banners' => Banners::find()->asArray()->all(), 'advantages' => Advantages::find()->asArray()->all()]);
 }