安之
写在控制器里面
public function actionCreate() { $model = new Info(); $model->status=1; if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('create', [ 'model' => $model, ]); } }
找问题的 小伙伴少走点弯路
哪个老师交你这么写的?
- 安之 赞了回答
写在控制器里面
public function actionCreate() { $model = new Info(); $model->status=1; if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('create', [ 'model' => $model, ]); } }
找问题的 小伙伴少走点弯路
- 安之 2017-07-07 已签到连续签到4天,获得了20个金钱
- 安之 发布了话题checkboxList 获取不到值 怎么办
- 安之 2017-07-06 已签到连续签到3天,获得了15个金钱
- 安之 2017-07-05 已签到连续签到2天,获得了10个金钱
- 安之 赞了说说我要提问
- 安之 发表了说说我要提问
- 安之 2017-07-04 已签到连续签到1天,获得了5个金钱