'model' => $model, 左边的model不是key吗 为什么create.php用的还是$model?
public function actionCreate()
{
$model = new PostForm();
//获取所有分类
$cat = CatModel::getAllCats();
return $this->render('create', ['model' => $model, 'cat' => $cat]);
}
public function actionCreate()
{
$model = new PostForm();
//获取所有分类
$cat = CatModel::getAllCats();
return $this->render('create', ['model' => $model, 'cat' => $cat]);
}
2017-06-29
举报