modules/admin/controllers/TrialController.php
/**
     * Lists all Trial models.
     * @return mixed
     */
Lists all Trial models.
@return mixed
Lists all Trial models . @return mixed
public function actionIndex()
    {
        $searchModel = new TrialSearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
        $product = ArrayHelper::map(Product::find()->where(['IN', 'status_id', [ProductStatus::STATUS_APPROVED, ProductStatus::STATUS_IN_STOCK]])->all(), 'id', 'name');
        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
            'product' => $product
        ]);
    }
public function actionIndex ( ) { $ searchModel = new TrialSearch ( ) ; $ dataProvider = $ searchModel -> search ( Yii :: $ app -> request -> queryParams ) ; $ product = ArrayHelper :: map ( Product :: find ( ) -> where ( [ 'IN' , 'status_id' , [ ProductStatus :: STATUS_APPROVED , ProductStatus :: STATUS_IN_STOCK ] ] ) -> all ( ) , 'id' , 'name' ) ; return $ this -> render ( 'index' , [ 'searchModel' => $ searchModel , 'dataProvider' => $ dataProvider , 'product' => $ product ] ) ; }
Lists all Trial models.
Lists all Trial models .