modules/admin/controllers/ArticleController.php
/**
     * Lists all Article models.
     * @return mixed
     */
Lists all Article models.
@return mixed
Lists all Article models . @return mixed
public function actionIndex()
    {
        $searchModel = new ArticleSearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
        $pagination = new Pagination([
            'defaultPageSize' => 5,
            'totalCount' => 60,
        ]);
        $articleCategorys = ArticleCategory::find()->all();
        $articleTags = ArticleTag::find()->all();
        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
            'pagination' => $pagination,
            'articleCategorys' => $articleCategorys,
            'articleTags' => $articleTags
        ]);
    }
public function actionIndex ( ) { $ searchModel = new ArticleSearch ( ) ; $ dataProvider = $ searchModel -> search ( Yii :: $ app -> request -> queryParams ) ; $ pagination = new Pagination ( [ 'defaultPageSize' => 5 , 'totalCount' => 60 , ] ) ; $ articleCategorys = ArticleCategory :: find ( ) -> all ( ) ; $ articleTags = ArticleTag :: find ( ) -> all ( ) ; return $ this -> render ( 'index' , [ 'searchModel' => $ searchModel , 'dataProvider' => $ dataProvider , 'pagination' => $ pagination , 'articleCategorys' => $ articleCategorys , 'articleTags' => $ articleTags ] ) ; }
Lists all Article models.
Lists all Article models .