public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => Banners::find()]); return $this->render('index', ['dataProvider' => $dataProvider]); }
/** * 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()]); }