Example #1
0
 /**
  * Lists all Category models.
  * @return mixed
  */
 public function actionIndex()
 {
     $tree = Category::sortTree();
     return $this->render('index', ['cate' => $tree]);
     // $searchModel = new CategorySearch();
     // $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     // return $this->render('index', [
     //     'searchModel' => $searchModel,
     //     'dataProvider' => $dataProvider,
     // ]);
 }