controllers/DefaultController.php
public
    function actionProjectupdate()
    {
        $id = \Yii::$app->request->get('id');
        if (!isset($id)) {
            return new NotFoundHttpException('The requested project does not exist.');
        }

        $model = $this->findProjectmodel($id);
        if (!$model instanceof Project) {
            return false;
        }

        if ($model->load(Yii::$app->request->post()) /*&& $model->setautovalues()*/ && $model->save()) {
            return $this->redirect(['projectview', 'id' => $model->id]);
        } else {
            return $this->render('projectupdate', [
                'model' => $model,
            ]);
        }
    }
public
    function actionProjectupdate()
    {
        $id = \Yii::$app->request->get('id');
        if (!isset($id)) {
            return new NotFoundHttpException('The requested project does not exist.');
        }

        $model = $this->findProjectmodel($id);
        if (!$model instanceof Project) {
            return false;
        }

        if ($model->load(Yii::$app->request->post()) /*&& $model->setautovalues()*/ && $model->save()) {
            return $this->redirect(['projectview', 'id' => $model->id]);
        } else {
            return $this->render('projectupdate', [
                'model' => $model,
            ]);
        }
    }
public function actionProjectupdate ( ) { $ id = \ Yii :: $ app -> request -> get ( 'id' ) ; if ( ! isset ( $ id ) ) { return new NotFoundHttpException ( 'The requested project does not exist.' ) ; } $ model = $ this -> findProjectmodel ( $ id ) ; if ( ! $ model instanceof Project ) { return false ; } if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) /*&& $model->setautovalues()*/ && $ model -> save ( ) ) { return $ this -> redirect ( [ 'projectview' , 'id' => $ model -> id ] ) ; } else { return $ this -> render ( 'projectupdate' , [ 'model' => $ model , ] ) ; } }
Updates an existing Projects model.
If update is successful, the browser will be redirected to the 'view' page.
@param integer $id
@return mixed
Updates an existing Projects model . If update is successful the browser will be redirected to the view page .