151 - Ошибка при создании записи в блоге

parent 83f6e18c
...@@ -86,8 +86,8 @@ class PostAdminController extends AdminController ...@@ -86,8 +86,8 @@ class PostAdminController extends AdminController
*/ */
public function actionCreate() public function actionCreate()
{ {
$model = new Post('manual'); $model = new Post();
$model->setScenario('manual');
if (Yii::$app->request->isPost) if (Yii::$app->request->isPost)
{ {
$model->attributes = Yii::$app->request->post('Post'); $model->attributes = Yii::$app->request->post('Post');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment