backend/modules/product/controllers/ProductController.php
/**
     * Lists all Product models.
     * @return mixed
     */
Lists all Product models.
@return mixed
Lists all Product models . @return mixed
public function actionIndex() {
        $searchModel = new ProductSearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
        $dataProvider->query->orderBy(['id' => SORT_DESC]);
        return $this->render('index', [
                    'searchModel' => $searchModel,
                    'dataProvider' => $dataProvider,
        ]);
    }
public function actionIndex ( ) { $ searchModel = new ProductSearch ( ) ; $ dataProvider = $ searchModel -> search ( Yii :: $ app -> request -> queryParams ) ; $ dataProvider -> query -> orderBy ( [ 'id' => SORT_DESC ] ) ; return $ this -> render ( 'index' , [ 'searchModel' => $ searchModel , 'dataProvider' => $ dataProvider , ] ) ; }
Lists all Product models.
Lists all Product models .