コード例 #1
0
 public function resultAction()
 {
     $this->view->setVar('siteTitle', '会员管理');
     $this->view->disable(1);
     $arr = \MagicCategory::find();
     //        $arr->toArray();
     foreach ($arr->toArray() as $key => $val) {
         echo $val['category_name'];
     }
     console($arr->toArray());
 }
コード例 #2
0
 public function resultAction()
 {
     //        $result = \MagicCategory::query("select category_name,category_id from magic_category");
     $result = \MagicCategory::find()->toArray();
     $this->view->setVars(['results' => $result]);
 }