controllers/ItemControllerAbstract.php
public function actionCreate() {
        /** @var \jarrus90\User\models\Role|\jarrus90\User\models\Permission $model */
        $model = \Yii::createObject([
                    'class' => $this->modelClass,
                    'scenario' => 'create',
        ]);

        $this->performAjaxValidation($model);

        if ($model->load(\Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['index']);
        }

        return $this->render('create', [
                    'model' => $model,
        ]);
    }
public function actionCreate() {
        /** @var \jarrus90\User\models\Role|\jarrus90\User\models\Permission $model */
        $model = \Yii::createObject([
                    'class' => $this->modelClass,
                    'scenario' => 'create',
        ]);

        $this->performAjaxValidation($model);

        if ($model->load(\Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['index']);
        }

        return $this->render('create', [
                    'model' => $model,
        ]);
    }
Shows create form.
@return string|Response
@throws \yii\base\InvalidConfigException