public function actionCreate() { $model = new CarBrand(); if ($model->load(\Yii::$app->request->post())) { if ($model->validate() && $model->save()) { return $this->redirect(['index']); } } return $this->render('form', ['model' => $model]); }