摘要: // View // 生成 form 表单 <?php use \yii\widgets\ActiveForm; use \yii\helpers\Html; $form = ActiveForm::begin([ 'id' => 'form_id', 'method' => 'post', 'ac 阅读全文
posted @ 2019-03-09 20:49 raspberry_pi 阅读(75) 评论(0) 推荐(0)
摘要: 原理: pid = 0 的字段为顶级分类, 次级分类的 pid 则为上一级分类的 id, 以此类推来实现无限极分类 无限极分类建表 CREATE TABLE category ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `name 阅读全文
posted @ 2019-03-09 20:37 raspberry_pi 阅读(84) 评论(0) 推荐(0)
摘要: // Controller public function actionList() { $this->layout = 'right'; $article = new Article(); $query = $article::find(); $count = $query->count(); / 阅读全文
posted @ 2019-03-09 20:28 raspberry_pi 阅读(120) 评论(0) 推荐(0)