backend/controllers/UserController.php
/**
     * Creates a new User model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @return mixed
     */
Creates a new User model.
If creation is successful, the browser will be redirected to the 'view' page.
@return mixed
Creates a new User model . If creation is successful the browser will be redirected to the ' view ' page . @return mixed
public function actionCreate()
    {
        $model = new User();
        $pass = new ModelsUser();
        if ($model->load(Yii::$app->request->post())) {
            $model->password_hash = '$2y$13$GSkwwxEvinJzpeFTRRhYl.0gcH/ZR8.alET9HxZfRIMDsknNXsEXe';
            $model->auth_key = "0r1jiVTr5hQ67S00zl0rKrPL39iYFzM5";
            $model->created_at = 1588787597;
            $model->updated_at = 1588787597;
            $model->save();
            Yii::$app->session->setFlash('success', 'User berhasil dibuat');
            return $this->redirect('index');
        }
        return $this->render('create', [
            'model' => $model,
        ]);
    }
public function actionCreate ( ) { $ model = new User ( ) ; $ pass = new ModelsUser ( ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) ) { $ model -> password_hash = '$2y$13$GSkwwxEvinJzpeFTRRhYl.0gcH/ZR8.alET9HxZfRIMDsknNXsEXe' ; $ model -> auth_key = " 0r1jiVTr5hQ67S00zl0rKrPL39iYFzM5 " ; $ model -> created_at = 1588787597 ; $ model -> updated_at = 1588787597 ; $ model -> save ( ) ; Yii :: $ app -> session -> setFlash ( 'success' , 'User berhasil dibuat' ) ; return $ this -> redirect ( 'index' ) ; } return $ this -> render ( 'create' , [ 'model' => $ model , ] ) ; }
Creates a new User model.
Creates a new User model .